当前位置:网站首页>Using Visual Studio

Using Visual Studio

2022-06-25 14:59:00 qq_ twenty-three million nine hundred and fifty-three thousand

1, problem :
MSVCRTD.lib(exe_main.obj) : error LNK2019: Unresolved external symbols main, The sign is in the function “int __cdecl invoke_main(void)” ([email protected]@YAHXZ) Cited in
resolvent :
To configure -> routine -> Configuration type Change to " Dynamic library dll”
2, problem :
error LNK2038: detected “RuntimeLibrary” Mismatches for : value “MDd_DynamicDebug” Mismatch value “MTd_StaticDebug”(Code.obj in )
Question why : Several engineering The runtime settings are different , Set the runtime library to the same
resolvent : Item attribute -> Configuration properties -> C/C++ -> Code generation -> Runtime All settings are the same Multithreaded debugging (/MTd)
3, problem
error LNK2019 Unresolved external symbols public: bool __thiscall CppSQLite3Query::eof(void)xxxxxxxxx
Question why : The included static library is not added to the project
resolvent : Item attribute -> Configuration properties -> The linker -> Input -> Additional dependency -> Fill in the corresponding static library , Such as sqlite_static.lib
4, How to add a reference library path
Item attribute -> Configuration properties -> The linker -> routine -> Additional Library Directory
5, How to reference a static library
Item attribute -> Configuration properties -> The linker -> Input -> Additional dependency -> Fill in the corresponding static library , Such as sqlite_static.lib
6, How to include header files
Item attribute -> Configuration properties ->C/C+±> routine -> Attach include directory
7, If you output the compilation results to other directories
Configuration properties -> routine -> The output directory

原网站

版权声明
本文为[qq_ twenty-three million nine hundred and fifty-three thousand ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200514581567.html