Severity Code Description Project File Line Suppression State Details Error LNK2001…
- User
Severity Code Description Project File Line Suppression State Details Error LNK2001 unresolved external symbol "public: static int CApp::bIsExistBlade" (?bIsExistBlade@CApp@@2HA) Demo C:\Users\softTop\Documents\2024-6-12-freeCAD\MySgCore_SON_2024-9-10\c++_sn\App.obj 1
- Assistant
The error you are encountering is a linker error, specifically LNK2001, which indicates that the linker is unable to resolve an external symbol. In this case, it's the static member variable
bIsExistBladeof the classCApp.Here are some steps you can take to resolve this error:
-
Ensure Definition:
- You have declared
bIsExistBladeas a static member in theCAppclass, but it hasn't been defined in any of your source files. You need to define it outside of the class definition, typically in a source (.cpp) file.
// In some .cpp file (e.g., CApp.cpp) #include "CApp.h" // Ensure the class definition is included int CApp::bIsExistBlade = 0; // or some initial value - You have declared
-
- User
how to put Timer process function into external file in setTimer function
- Assistant