SFML community forums

Help => General => Topic started by: abcnb on October 20, 2022, 01:19:22 pm

Title: MSVC LINK1104 cannot open file 'sfml-graphics-d.obj'
Post by: abcnb on October 20, 2022, 01:19:22 pm
MSVC LINK1104 cannot open file 'sfml-graphics-d.obj' in Debug mode.
MSVC LINK1104 cannot open file 'sfml-graphics-d.obj' in Release mode.

Could you answer what it is? Why this is every time wrong?

SFML source / CMake GUI / ignore Build_type / all by default (settings for dynamic linking) / MSVC / Debug / build (-d.lib and -d.dll)/ Release / build ( .lib and .dll) / All ok.

SFML test / all settings from https://www.sfml-dev.org/tutorials/2.5/start-vc.php / all paths correspond

Why does MSVC want .obj ? It is really pain.
Title: Re: MSVC LINK1104 cannot open file 'sfml-graphics-d.obj'
Post by: eXpl0it3r on October 20, 2022, 01:28:32 pm
Seems like something in your project setup is wrong.
Can you double check what libraries you're linking?

In release you shouldn't be linking any *-d libraries.
And you also shouldn't have any *.obj listed there, there should be *.lib files.
Title: Re: MSVC LINK1104 cannot open file 'sfml-graphics-d.obj'
Post by: abcnb on October 20, 2022, 01:38:43 pm
This was my fault. I forgot to write .lib in Additional Dependencies sfml-system-d.lib and couldn't find this a several hours. Thanks for answer!