#Failed to compile in Release mode

47 messages · Page 1 of 1 (latest)

weak spire
#

Hey, so I just tried to build my app in Release mode and it failed.
Im trying to build one of the ImGui examples (example_glfw_opengl3) and I'm getting these errors

1>glfw3.lib(monitor.obj) : error LNK2001: unresolved external symbol __imp__strdup
1>glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp__strdup
1>glfw3.lib(win32_joystick.obj) : error LNK2001: unresolved external symbol __imp__strdup
1>C:\Users\Theos\Desktop\imgui-1.90.4\examples\example_glfw_opengl3\Release\example_glfw_opengl3.exe : fatal error LNK1120: 1 unresolved externals
mellow jackalBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

iron plank
#

This often indicates a build mismatch

weak spire
iron plank
#

check the comments for a specific example in this case

iron plank
# weak spire what does that mean?

the glfw.lib you are linking is not meant to be linked the way you are linking everything else. Like it may be expecting the runtime to be dynamically linked but you are linking it statically.

#

it can also be a debug/release mismatch, a 32bit/64bit mismatch, or I think windows as an mt (multithreading?) setting

weak spire
#

release:

iron plank
#

are you linking the same .lib file for both?

weak spire
#

release:

#

debug:

#

looks the same

#

debug has Incremental Linking enabled tho

#

not sure if thats important

iron plank
#

what libraries are you linking?

#

(for both)

weak spire
#

u mean the Linker > Input > Additional Dependencies?

iron plank
#

probably?

weak spire
#

okey

iron plank
#

I don't actualy dev on windows

weak spire
iron plank
#

can you copy that ignore

#

MSVCRT.lib and LIBCMT.lib are the two libraries which seem to have this symbol

iron plank
#

yea that was my initial guess a build mismatch of some kind

lofty dust
iron plank
weak spire
weak spire
lofty dust
#

Glfw

weak spire
#

im using the one from examples

#

i guess they are using win32 version

lofty dust
#

There are prebuilt binaries on their website, both x86 and x86_64 version

weak spire
#

okay, i switched to Release Win32 and it works

lofty dust
iron plank
weak spire
#

thanks for help :)

mellow jackalBOT
#

@weak spire Has your question been resolved? If so, type !solved :)

weak spire
#

!solved