Permalink
Browse files

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
  • Loading branch information...
1 parent 975df62 commit 37712fd083695e9c7acd24b63fd04cc51e30071e @SRombauts SRombauts committed Mar 25, 2012
Showing with 12 additions and 0 deletions.
  1. +4 −0 html/html_smartypants.c
  2. +4 −0 src/autolink.c
  3. +4 −0 src/markdown.c
@@ -22,6 +22,10 @@
#include <stdio.h>
#include <ctype.h>
+#if defined(_WIN32)
+#define snprintf _snprintf
+#endif
+
struct smartypants_data {
int in_squote;
int in_dquote;
View
@@ -21,6 +21,10 @@
#include <stdio.h>
#include <ctype.h>
+#if defined(_WIN32)
+#define strncasecmp _strnicmp
+#endif
+
int
sd_autolink_issafe(const uint8_t *link, size_t link_len)
{
View
@@ -25,6 +25,10 @@
#include <ctype.h>
#include <stdio.h>
+#if defined(_WIN32)
+#define strncasecmp _strnicmp
+#endif
+
#define REF_TABLE_SIZE 8
#define BUFFER_BLOCK 0

0 comments on commit 37712fd

Please sign in to comment.