Unresolved external symbol __dtoul3 and __utlod3

llama001 wrote on Saturday, March 29, 2014:

Hi all,

I was looking for some libraries that make window handling much easier.
I am glad I stumbled upon glfw, it looks very usefull.
Only trouble is that I don’t get it quite running yet.

I have microsoft visual studio 2012 express and I am using the 32-bit windows pre-compiled binaries. When I compile any example I get the following warnings and errors:

Warning 1 warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/OPT:LBR’ specification C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\glfwTest2\glfwTest2.obj glfwTest2
Warning 2 warning LNK4067: ambiguous entry point; selected ‘mainCRTStartup’ C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\glfwTest2\LINK glfwTest2
Warning 3 warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\glfwTest2\LINK glfwTest2
Error 4 error LNK2019: unresolved external symbol __dtoul3 referenced in function __glfwPlatformSetTime C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\glfwTest2\glfw3.lib(win32_time.obj) glfwTest2
Error 5 error LNK2019: unresolved external symbol __ultod3 referenced in function __glfwInitTimer C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\glfwTest2\glfw3.lib(win32_time.obj) glfwTest2
Error 6 error LNK1120: 2 unresolved externals C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\Debug\glfwTest2.exe glfwTest2

I have searched the internet for some answer, but I couldn’t find any similair error. Do I miss a library or something?

Thanks in advance!

dougbinks wrote on Sunday, March 30, 2014:

I think you’re missing Kernel32.lib as one of the libraries you need to link against.

If you need more help please detail your link settings (easiest to copy the Project Properties->Linker->Command Line string).

llama001 wrote on Monday, March 31, 2014:

Thanks for answering.
The kernel32.lib was already linked as default. Below is the Command Line String (also thanks for this trick!):

/OUT:“C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\Debug\glfwTest2.exe” /MANIFEST /NXCOMPAT /PDB:“C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\Debug\glfwTest2.pdb” /DYNAMICBASE “opengl32.lib” “glu32.lib” “glew32.lib” “glfw3.lib” “kernel32.lib” “user32.lib” “gdi32.lib” “winspool.lib” “comdlg32.lib” “advapi32.lib” “shell32.lib” “ole32.lib” “oleaut32.lib” “uuid.lib” “odbc32.lib” “odbccp32.lib” /DEBUG /MACHINE:X86 /INCREMENTAL:NO /PGD:“C:\Users\xxx\Documents\Visual Studio 2012\glfwTest2\Debug\glfwTest2.pgd” /SUBSYSTEM:CONSOLE /MANIFESTUAC:“level=‘asInvoker’ uiAccess=‘false’” /ManifestFile:“Debug\glfwTest2.exe.intermediate.manifest” /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:“C:\OpenGLWrappers\glfw-3.0.4.bin.WIN32\lib-msvc120” /LIBPATH:“C:\OpenGLWrappers\glew-1.10.0\lib\Release\Win32” /TLBID:1

dougbinks wrote on Monday, March 31, 2014:

You’re using the libs in folder lib-msvc120 and you want the ones in folder lib-msvc110 as visual studio 2012 is version 11. Indeed, you can see this if you go to project->properties->configuration Properties->general->Platform Toolset, you’ll see Visual Studio 2012 (v110).

Good luck!

imvexus wrote on Sunday, April 20, 2014:

I had to register to say thank you. I don’t know why it was so hard, but MS versioning caught me off guard and I spent 2+ hours trying to figure out why everything in the linker looked good but I was getting errors. I am using VS2012 and I needed to link the MSVC110 libraries instead of the MSVC120. Huge facepalm. Thanks!

elmindreda wrote on Sunday, April 20, 2014:

I’ll add documentation on versions in the next release.

v3rc1ng3t0r1x wrote on Friday, September 19, 2014:

Same, Thanks Doug!!!