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

Linker error (64 bit build) #21

Closed
christianclavet opened this issue Aug 10, 2016 · 2 comments
Closed

Linker error (64 bit build) #21

christianclavet opened this issue Aug 10, 2016 · 2 comments

Comments

@christianclavet
Copy link

christianclavet commented Aug 10, 2016

Hi, I've done a build of the project in 64bit.

When I build the project with the files, it compiles but fail to link. The examples are fine, so I must do something wrong.

I tried adding to my project the nfd.h header and/or only using include, they generate the same error.

The compiler generate the code in C++ in my project.

Here is the output of my console when I try to build it (MSVC 2015, Windows 10):

1>LINK : warning LNK4098: conflit entre la bibliothèque par défaut 'MSVCRT' et les autres bibliothèques ; utilisez /NODEFAULTLIB:library
1>nfd.lib(nfd_win.obj) : warning LNK4217: symbole défini localement __stdio_common_vsprintf_s importé dans la fonction sprintf_s
1>nfd.lib(nfd_common.obj) : warning LNK4217: symbole défini localement free importé dans la fonction NFD_PathSet_Free
1>nfd.lib(nfd_common.obj) : warning LNK4217: symbole défini localement malloc importé dans la fonction NFDi_Malloc
1>nfd.lib(nfd_win.obj) : error LNK2019: symbole externe non résolu __imp_strncat référencé dans la fonction "enum nfdresult_t __cdecl AddFiltersToDialog(struct IFileDialog *,char const *)" (?AddFiltersToDialog@@ya?AW4nfdresult_t@@PEAUIFileDialog@@PeBd@Z)
1>nfd.lib(nfd_common.obj) : error LNK2019: symbole externe non résolu __imp_strncpy référencé dans la fonction NFDi_UTF8_Strlen
1>../../IRB_Model_D.exe : fatal error LNK1120: 2 externes non résolus
========== Régénération globale : 0 a réussi, 1 a échoué, 0 a été ignoré ==========

@mlabbe
Copy link
Owner

mlabbe commented Aug 12, 2016

This is likely your code generation set to the wrong runtime library.

Rebuild nfd to match code generation for the build configuration you are linking it with. (ex: Multithreaded DLL).

@christianclavet
Copy link
Author

Thanks! I've just read about this. I'll do a double check. I did not know that other libs that are compiled with MSVC should not have different settings in their runtime library. I'll do a double check and report, but it must be it. I already have 2 libs linked in my application and they work fine.

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