Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Fix for building with Visual Studio 2008 Express #15

Closed
wants to merge 1 commit into from
Closed

Fix for building with Visual Studio 2008 Express #15

wants to merge 1 commit into from

Conversation

SRombauts
Copy link

Fix for building with Visual Studio 2008 Express (link error to be precise)

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

…ecise)

I needed to add 1 define in 3 files, betweend #if defined(_WIN32) guards :
- #define strncasecmp	_strnicmp
- #define snprintf	_snprintf
@SRombauts
Copy link
Author

Before applying this patch, I also needed to complete Visual Studio 2008 SDK with a missing "stdint.h" :
http:https://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio

Perhaps shall I also make a workaround for this ?
=> I'm currently downloading Visual Studio 2010, as I've been told that this missing file is no more an issue.

@FSX
Copy link
Owner

FSX commented Mar 25, 2012

You should send this pull request to the Sundown repository, because I update the Sundown files with a git submodule. There are already 2 people (I think) who did that and it's still not merged in Sundown.

Maybe I'll created a temporary fork and merge your changed in there.

@SRombauts
Copy link
Author

Yes, I've made a pull request to the upstream Sundown project
https://github.com/tanoku/sundown/pull/98

Thank you

@andrew-d
Copy link

Looks like @SRombauts pull request was just merged. If you update to the latest version of sundown, I'll test on my Windows machine too.

@FSX
Copy link
Owner

FSX commented Mar 25, 2012

I have updated the Sundown files.

@andrew-d
Copy link

Thank you - I can confirm that it builds on Windows now. Most Visual Studio compilers don't include stdint.h (except VS2010), so you can download a third-party one and put it in the include directory. I use this one:

http:https://msinttypes.googlecode.com/svn/trunk/stdint.h

After that, running python setup.py install completes with no problems.

@FSX
Copy link
Owner

FSX commented Mar 25, 2012

Where in the include directory in Window/Visual Studio? I can put it in the installation instructions.

@andrew-d
Copy link

I installed Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio 9.0, so I put stdint.h at C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include.

@FSX
Copy link
Owner

FSX commented Mar 25, 2012

Ok, added. 032ca13

@FSX FSX closed this Mar 25, 2012
@andrew-d
Copy link

Awesome, thanks!

@SRombauts
Copy link
Author

Thanks, this way you've mostly fixed @Anomareh/mynt under Windows :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants