Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error VS2015 #20

Closed
TheOrestes opened this issue Aug 7, 2016 · 2 comments
Closed

Linking error VS2015 #20

TheOrestes opened this issue Aug 7, 2016 · 2 comments

Comments

@TheOrestes
Copy link

When I tried linking it to my framework in VS2015, I got following linking error. I used VS2010 solution file, automatically upgraded to VS2015, compiled the static libs.

unresolved external symbol __imp_strncat referenced in function "int __cdecl AppendExtensionToSpecBuf(char const *,char *,unsigned __int64)" (?AppendExtensionToSpecBuf@@YAHPEBDPEAD_K@Z)   GL_Framework    
C:\SourceControl\gl_framework\nfd_d.lib(nfd_win.obj)    1

unresolved external symbol __imp_strncpy referenced in function NFDi_UTF8_Strlen    GL_Framework    C:\SourceControl\gl_framework\nfd_d.lib(nfd_common.obj) 1

After changing options in "Code Generation>>Runtime Library" to /MTd instead of /MDd, my problem was solved. Maybe useful for someone in future.

@mlabbe
Copy link
Owner

mlabbe commented Aug 7, 2016

In all Windows cases, you need to match the linked runtime library with the base executable's. If switching it to /MTd worked, that's because you are linking against the static version of the library in your calling executable.

It is perfectly okay to make that change in the upgraded project file.

@mlabbe mlabbe closed this as completed Aug 7, 2016
@TheOrestes
Copy link
Author

Thanks for the reply & pretty awesome utility repo :)

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

No branches or pull requests

2 participants