Fix for building with Visual Studio #98

Merged
merged 1 commit into from Mar 25, 2012

Conversation

Projects
None yet
3 participants
Contributor

SRombauts commented Mar 25, 2012

I know that two other pull request also handle this issue, but I believe that this is the smallest/cleanest way to handle the portability.

Correct the following link errors:
markdown.obj : error LNK2019: unresolved external symbol _strncasecmp referenced in function _find_block_tag
autolink.obj : error LNK2001: unresolved external symbol _strncasecmp
html_smartypants.obj : error LNK2019: unresolved external symbol _snprintf referenced in function _smartypants_quotes

I needed to add 1 define in 3 files, betweend #if defined(_WIN32) guards :

  • #define strncasecmp _strnicmp
  • #define snprintf _snprintf

Thank you,
Srombauts

@SRombauts SRombauts Fix for building with Visual Studio 2008 Express
Correct the following link errors:
markdown.obj : error LNK2019: unresolved external symbol _strncasecmp referenced in function _find_block_tag
autolink.obj : error LNK2001: unresolved external symbol _strncasecmp
html_smartypants.obj : error LNK2019: unresolved external symbol _snprintf referenced in function _smartypants_quotes

I needed to add 1 define in 3 files, betweend #if defined(_WIN32) guards :
- #define strncasecmp _strnicmp
- #define snprintf _snprintf
37712fd
Owner

vmg commented Mar 25, 2012

Thank you so much. I didn't quite like the idea of adding a Windows-only header.

vmg merged commit 690ec87 into vmg:master Mar 25, 2012

Contributor

SRombauts commented Mar 26, 2012

Thanks, this way you've mostly fixed and thus under Windows :)

Contributor

chobie commented Mar 26, 2012

Thank you, this would be helpful for PECL Sundown under Windows!

chobie referenced this pull request Apr 6, 2012

Closed

Microsoft Visual Studio #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment