jsbsim icon indicating copy to clipboard operation
jsbsim copied to clipboard

unresolved external symbol(s) logging/console related

Open jamesford42 opened this issue 1 year ago • 5 comments

Getting this trying to build JSBSimForUnreal.sln (master)

Error	LNK1120	5 unresolved externals	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\UnrealEngine\Plugins\JSBSimFlightDynamicsModel\Source\ThirdParty\JSBSim\LibDebug\JSBSim.dll	1	
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl JSBSim::FGLogConsole::SetLevel(enum JSBSim::LogLevel)" (?SetLevel@FGLogConsole@JSBSim@@UEAAXW4LogLevel@2@@Z)	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\FGFDMExec.obj	1	
Error	LNK2001	unresolved external symbol "public: virtual void __cdecl JSBSim::FGLogConsole::Format(enum JSBSim::LogFormat)" (?Format@FGLogConsole@JSBSim@@UEAAXW4LogFormat@2@@Z)	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\FGFDMExec.obj	1	
Error	LNK2019	unresolved external symbol "public: class JSBSim::FGLogging & __cdecl JSBSim::FGLogging::operator<<(enum JSBSim::LogFormat)" (??6FGLogging@JSBSim@@QEAAAEAV01@W4LogFormat@1@@Z) referenced in function "public: bool __cdecl JSBSim::FGFDMExec::RunIC(void)" (?RunIC@FGFDMExec@JSBSim@@QEAA_NXZ)	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\FGFDMExec.obj	1	
Error	LNK2019	unresolved external symbol "public: void __cdecl JSBSim::FGLogging::Flush(void)" (?Flush@FGLogging@JSBSim@@QEAAXXZ) referenced in function "public: virtual __cdecl JSBSim::FGLogging::~FGLogging(void)" (??1FGLogging@JSBSim@@UEAA@XZ)	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\FGFDMExec.obj	1	
Error	LNK2019	unresolved external symbol "public: __cdecl JSBSim::FGXMLLogging::FGXMLLogging(class std::shared_ptr<class JSBSim::FGLogger>,class JSBSim::Element *,enum JSBSim::LogLevel)" (??0FGXMLLogging@JSBSim@@QEAA@V?$shared_ptr@VFGLogger@JSBSim@@@std@@PEAVElement@1@W4LogLevel@1@@Z) referenced in function "public: bool __cdecl JSBSim::FGFDMExec::LoadPlanet(class SGPath const &,bool)" (?LoadPlanet@FGFDMExec@JSBSim@@QEAA_NAEBVSGPath@@_N@Z)	JSBSimForUnreal	D:\Projects\Unreal Projects\JSBSim\FGFDMExec.obj	1	

jamesford42 avatar Jul 03 '24 16:07 jamesford42

Take a look at - https://github.com/JSBSim-Team/jsbsim/discussions/1109

seanmcleod avatar Jul 03 '24 18:07 seanmcleod

Yea i found the .cpp file where those methods were defined, it was not included in the solution. Please automate this so the the cmake and .sln don't keep getting out of sync. Id recommend using wildcards.

jamesford42 avatar Jul 03 '24 22:07 jamesford42

The original commit added a reference to FGLog.cpp in JSBSim.vcxproj but not to JSBSimForUnreal.vcxproj, added it in commit - https://github.com/JSBSim-Team/jsbsim/pull/1111/commits/ca8d4a5db21edc23a67ddd62b5876d18b8e26512

seanmcleod avatar Jul 03 '24 22:07 seanmcleod

Hmm, wildcards in .vcxproj files are a bit of an issue - https://learn.microsoft.com/en-us/cpp/build/reference/vcxproj-files-and-wildcards?view=msvc-170

seanmcleod avatar Jul 03 '24 22:07 seanmcleod

Doh, guess i conflated it with .csproj(s) which i have more experience with.

jamesford42 avatar Jul 04 '24 02:07 jamesford42

Doh, guess i conflated it with .csproj(s) which i have more experience with.

@jamesford42 So should this issue be closed ?

bcoconni avatar Sep 08 '24 09:09 bcoconni

Doh, guess i conflated it with .csproj(s) which i have more experience with.

@jamesford42 So should this issue be closed ?

im unable to personally confirm it, but judging by the commits, it sure sounds like it

jamesford42 avatar Sep 15 '24 00:09 jamesford42