gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.51k stars 782 forks source link

Numerous unresolved symbols #2641

Closed bclay1297 closed 1 week ago

bclay1297 commented 2 weeks ago

I am using osgEarth 3.7.0 build 161 with Visual Studio 2022. The software was downloaded and built using the Vcpackage bootstrap The osgEarth.lib file is included in the VC Project. I had clean build when building the examples. The errors listed below started when I tried to bring in some of my old source code. I am trying to get functions such as Sky, MeasureTool, Graticule, annotations etc. I added osgEarthImGui.lib to the project but it did not appear to change anything

I am upgrading some of my old code and have gotten past the compile syntax errors but I get numerous link errors. The list below is just a portion of the errors reported

1>------ Build started: Project: EarthViewer, Configuration: Release x64 ------
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl osgEarth::Util::Controls::LabelControl::LabelControl(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,class osg::Vec4f const &)" (__imp_??0LabelControl@Controls@Util@osgEarth@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEBVVec4f@osg@@@Z) referenced in function "public: int __cdecl GraticuleOverlay::AddOverlay(class osgViewer::Viewer *,class osg::Group *,class osgEarth::MapNode *,bool,char const *)" (?AddOverlay@GraticuleOverlay@@QEAAHPEAVViewer@osgViewer@@PEAVGroup@osg@@PEAVMapNode@osgEarth@@_NPEBD@Z)
1>MeasureTool.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl osgEarth::Util::Controls::LabelControl::LabelControl(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,class osg::Vec4f const &)" (__imp_??0LabelControl@Controls@Util@osgEarth@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEBVVec4f@osg@@@Z)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl osgEarth::Util::Controls::LabelControl::~LabelControl(void)" (__imp_??1LabelControl@Controls@Util@osgEarth@@UEAA@XZ) referenced in function "public: virtual void * __cdecl osgEarth::Util::Controls::LabelControl::`scalar deleting destructor'(unsigned int)" (??_GLabelControl@Controls@Util@osgEarth@@UEAAPEAXI@Z)
1>MeasureTool.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl osgEarth::Util::Controls::LabelControl::~LabelControl(void)" (__imp_??1LabelControl@Controls@Util@osgEarth@@UEAA@XZ)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl osgEarth::Util::Controls::VBox::VBox(void)" (__imp_??0VBox@Controls@Util@osgEarth@@QEAA@XZ) referenced in function "public: int __cdecl GraticuleOverlay::AddOverlay(class osgViewer::Viewer *,class osg::Group *,class osgEarth::MapNode *,bool,char const *)" (?AddOverlay@GraticuleOverlay@@QEAAHPEAVViewer@osgViewer@@PEAVGroup@osg@@PEAVMapNode@osgEarth@@_NPEBD@Z)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl osgEarth::Util::Controls::VBox::~VBox(void)" (__imp_??1VBox@Controls@Util@osgEarth@@UEAA@XZ) referenced in function "public: virtual void * __cdecl osgEarth::Util::Controls::VBox::`scalar deleting destructor'(unsigned int)" (??_GVBox@Controls@Util@osgEarth@@UEAAPEAXI@Z)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl osgEarth::Util::Controls::ControlCanvas::~ControlCanvas(void)" (__imp_??1ControlCanvas@Controls@Util@osgEarth@@UEAA@XZ) referenced in function "public: virtual void * __cdecl osgEarth::Util::Controls::ControlCanvas::`scalar deleting destructor'(unsigned int)" (??_GControlCanvas@Controls@Util@osgEarth@@UEAAPEAXI@Z)
1>MeasureTool.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl osgEarth::Util::Controls::ControlCanvas::~ControlCanvas(void)" (__imp_??1ControlCanvas@Controls@Util@osgEarth@@UEAA@XZ)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl osgEarth::Util::Controls::ControlCanvas::ControlCanvas(void)" (__imp_??0ControlCanvas@Controls@Util@osgEarth@@QEAA@XZ) referenced in function "public: int __cdecl GraticuleOverlay::AddOverlay(class osgViewer::Viewer *,class osg::Group *,class osgEarth::MapNode *,bool,char const *)" (?AddOverlay@GraticuleOverlay@@QEAAHPEAVViewer@osgViewer@@PEAVGroup@osg@@PEAVMapNode@osgEarth@@_NPEBD@Z)
1>MeasureTool.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl osgEarth::Util::Controls::ControlCanvas::ControlCanvas(void)" (__imp_??0ControlCanvas@Controls@Util@osgEarth@@QEAA@XZ)
1>GraticuleOverlay.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: class osgEarth::Util::Controls::Control * __cdecl osgEarth::Util::Controls::ControlCanvas::addControlImpl(class osgEarth::Util::Controls::Control *)" (__imp_?addControlImpl@ControlCanvas@Controls@Util@osgEarth@@IEAAPEAVControl@234@PEAV5234@@Z) referenced in function "public: int __cdecl GraticuleOverlay::AddOverlay(class osgViewer::Viewer *,class osg::Group *,class osgEarth::MapNode *,bool,char const *)" (?AddOverlay@GraticuleOverlay@@QEAAHPEAVViewer@osgViewer@@PEAVGroup@osg@@PEAVMapNode@osgEarth@@_NPEBD@Z)
1>

Bruce

gwaldron commented 2 weeks ago

Bruce, The osgEarth::Controls code is now a "legacy" option that you have to enable in CMake. Set the OSGEARTH_BUILD_LEGACY_CONTROLS_API option ON to use it.

bclay1297 commented 2 weeks ago

Glenn: Is there a replacement I should be using instead of that to get graticules and measurement capabilities in current and future releases?

Bruce

On Mon, Oct 14, 2024 at 3:01 PM Glenn @.***> wrote:

Bruce, The osgEarth::Controls code is now a "legacy" option that you have to enable in CMake. Set the OSGEARTH_BUILD_LEGACY_CONTROLS_API option ON to use it.

— Reply to this email directly, view it on GitHub https://github.com/gwaldron/osgearth/issues/2641#issuecomment-2412014517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNLDTXWF5JDI64TYHOTMBTZ3QIG7AVCNFSM6AAAAABP5SVUG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJSGAYTINJRG4 . You are receiving this because you authored the thread.Message ID: @.***>

gwaldron commented 2 weeks ago

We do not plan on removing the Controls API - we are just no longer extending or maintaining it. So you are free to continue using it without any trouble.

The Controls API really only existed to support the demos, and we are using ImGui for that now.

Graticules do not use the Controls at all. The TerrainGUI has a measuring tool integrated into it - you are free to adapt that code if you like it.