Open External Symbols Occurred in relation to SOIL.lib

Asked 1 years ago, Updated 1 years ago, 115 views

I'm in big trouble
https://github.com/gameprogcpp/code

Even though I tried to copy chapter07 in to opengl's software called SOIL, I made the necessary entries for additional dependent files and additional library directories.

Severity level code description project file line suppression state
Error LNK2019 unresolved external symbol _imp_strstrstr was referenced by function _query_DXT_capability.    C++ Game C:\Users\`\source\repos\C++Game\SOIL.lib(SOIL.obj)1   

Severity level code description project file line suppression status
Error LNK2019 unresolved external symbol_imp_fread was referenced by function_SOIL_direct_load_DDS. C++ Game C:\Users\"\source\repos\C++ Game\SOIL.lib(SOIL.obj)1   

    Severity level code description project file line suppression status
Error LNK2019 unresolved external symbol _imp_feof was referenced by function _at_eof.    C++ Game C:\Users\"\source\repos\C++Game\SOIL.lib(stb_image_aug.obj)1   

has occurred.I don't know what to do.Thank you for your cooperation

Note: Sorry for the insufficient explanation.This is vs2017.

c++ visual-studio opengl game-development

2022-09-30 14:34

1 Answers

code/External/SOIL/lib/win/x86/SOIL.lib is out of date.

The CRT;C Runtime Library, including strstrstr in Visual Studio 2015, has been refactored in C++ language, which allows some functions to be inline deployed at compile time.This has side effects

  • Library compiled prior to Visual Studio 2013
  • (expects to be combined at link time)
  • Link to Visual Studio 2015 or later
  • (expecting inline deployment at compile time)

and a link error similar to the question.

The Game Programming in C++ Code seems to be intended to use Visual Studio 2017, so SOIL.lib should also get the source code and rebuild using Visual Studio 2017.You may want to report it to the project.

As a tentative solution, you can link by adding legacy_stdio_definitions.lib to the linker input.


2022-09-30 14:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.