elements icon indicating copy to clipboard operation
elements copied to clipboard

Windows Release linker properties for Examples are same as Debug producing a runtime error

Open PaulSquires opened this issue 1 year ago • 4 comments

Followed the setup/installation instructions per the Elements website and produced the elements.sln solution. (Visual Studio Community 2022).

Executed the ALL_BUILD using DEBUG profile. All examples built correctly. The resulting Debug folders contained the correct exe and supporting dll's.

Executed the ALL_BUILD using RELEASE profile. All examples built and the resulting Release folders contained the correct exe and supporting dll's. However, attempting to run the EXE produces this error dialog:

Screenshot 2024-09-06 174645

To fix, I needed to go into Project / Properties / Linker / Input / Additional Dependencies and remove the debug from the paths and change freetyped.lib to freetype.lib.

BEFORE Screenshot 2024-09-06 174953

AFTER Screenshot 2024-09-06 175501

Hopefully this is a valid issue and I am not simply misunderstanding the intricacies of how Visual Studio sets up it's projects.

PaulSquires avatar Sep 06 '24 20:09 PaulSquires

Thanks for reporting. It seems this is a cmake issue. Would you be interested in contributing the necessary fixes to the CMakeLists.txt files to have Windows building smoothly? Windows has always been a mess to work with.

djowel avatar Sep 06 '24 23:09 djowel

I gave this issue a shot today but sadly I can not figure it out (at least not yet). I guess I need to take some Mensa courses to get my CMake knowledge to a higher level before I can definitively bury this issue for good. I'll keep checking back to this issue to also see if anyone else has ideas or fixes it before I do.

PaulSquires avatar Sep 09 '24 19:09 PaulSquires

I gave this issue a shot today but sadly I can not figure it out (at least not yet). I guess I need to take some Mensa courses to get my CMake knowledge to a higher level before I can definitively bury this issue for good. I'll keep checking back to this issue to also see if anyone else has ideas or fixes it before I do.

Alright, I'll give this a shot later today.

djowel avatar Sep 09 '24 22:09 djowel

Good luck. I wish I was able to provide at least some degree of insight from my investigation. I find following the whole CMake build process when multiple CMakeLists.txt files are involved a little confusing but that's probably just a reflection of my inexperience with CMake.

It seems to me that path data is eventually somehow retrieved by Visual Studio from vcpkg paths to the installed libraries and then written into the different Examples *.vcxproj project files.

PaulSquires avatar Sep 10 '24 12:09 PaulSquires