Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running example application #20

Closed
parzival2 opened this issue Nov 6, 2022 · 2 comments
Closed

Problem running example application #20

parzival2 opened this issue Nov 6, 2022 · 2 comments

Comments

@parzival2
Copy link

parzival2 commented Nov 6, 2022

Hi,

I built Skybolt using conan and also set SKYBOLT_ASSETS_PATH environment variable correctly. I am getting an error while building

Building

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Array * __cdecl osg::CopyOp::operator()(class osg::Arr
ay const *)const " (??RCopyOp@osg@@UEBAPEAVArray@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt
-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Callback * __cdecl osg::CopyOp::operator()(class osg::
Callback const *)const " (??RCopyOp@osg@@UEBAPEAVCallback@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Software
s\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Drawable * __cdecl osg::CopyOp::operator()(class osg::
Drawable const *)const " (??RCopyOp@osg@@UEBAPEAVDrawable@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Software
s\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Image * __cdecl osg::CopyOp::operator()(class osg::Ima
ge const *)const " (??RCopyOp@osg@@UEBAPEAVImage@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt
-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Node * __cdecl osg::CopyOp::operator()(class osg::Node
 const *)const " (??RCopyOp@osg@@UEBAPEAVNode@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt-ma
ster\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Object * __cdecl osg::CopyOp::operator()(class osg::Ob
ject const *)const " (??RCopyOp@osg@@UEBAPEAVObject@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skyb
olt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::PrimitiveSet * __cdecl osg::CopyOp::operator()(class o
sg::PrimitiveSet const *)const " (??RCopyOp@osg@@UEBAPEAVPrimitiveSet@1@PEBV21@@Z) already defined in osg.lib(osg.dll)
[C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Referenced * __cdecl osg::CopyOp::operator()(class osg
::Referenced const *)const " (??RCopyOp@osg@@UEBAPEAVReferenced@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\So
ftwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Shape * __cdecl osg::CopyOp::operator()(class osg::Sha
pe const *)const " (??RCopyOp@osg@@UEBAPEAVShape@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt
-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::StateAttribute * __cdecl osg::CopyOp::operator()(class
 osg::StateAttribute const *)const " (??RCopyOp@osg@@UEBAPEAVStateAttribute@1@PEBV21@@Z) already defined in osg.lib(osg
.dll) [C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::StateAttributeCallback * __cdecl osg::CopyOp::operator
()(class osg::StateAttributeCallback const *)const " (??RCopyOp@osg@@UEBAPEAVStateAttributeCallback@1@PEBV21@@Z) alread
y defined in osg.lib(osg.dll) [C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests
\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::StateSet * __cdecl osg::CopyOp::operator()(class osg::
StateSet const *)const " (??RCopyOp@osg@@UEBAPEAVStateSet@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Software
s\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Texture * __cdecl osg::CopyOp::operator()(class osg::T
exture const *)const " (??RCopyOp@osg@@UEBAPEAVTexture@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::Uniform * __cdecl osg::CopyOp::operator()(class osg::U
niform const *)const " (??RCopyOp@osg@@UEBAPEAVUniform@1@PEBV21@@Z) already defined in osg.lib(osg.dll) [C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

osg.lib(CopyOp.obj) : error LNK2005: "public: virtual class osg::UniformCallback * __cdecl osg::CopyOp::operator()(clas
s osg::UniformCallback const *)const " (??RCopyOp@osg@@UEBAPEAVUniformCallback@1@PEBV21@@Z) already defined in osg.lib(
osg.dll) [C:\Softwares\Skybolt-master\Skyboltbuild\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxpro
j]

C:\Softwares\Skybolt-master\Skybolt-build\bin\Release\plugins\FftOceanTests.exe : fatal error LNK1169: one or more multiply defined symbols found [C:\Softwares\Skybolt-master\Skybolt-build\src\Skybolt\SkyboltEnginePlugins\FftOceanTests\FftOceanTests.vcxproj]

and I got an error while running MinimalApp in Examples.
Running MinimalApp

[2022-11-06 18:07:34.208917] [0x000025c8] [info]    No --settingsFile program argument specified. Using default settings file location: '"C:\\Users\\rkaly\\AppData\\Local\\Skybolt\\Settings.json
[2022-11-06 18:07:34.209905] [0x000025c8] [warning] Settings file not found: C:\\Users\\rkaly\\AppData\\Local\\Skybolt\\Settings.json
[2022-11-06 18:07:34.209905] [0x000025c8] [info]    Loaded plugin: FftOcean.dll
[2022-11-06 18:07:34.210905] [0x000025c8] [info]    12 CPU cores detected.  Creating 11 background threads.
[2022-11-06 18:07:34.210905] [0x000025c8] [info]    Registered asset package: Core
[2022-11-06 18:07:34.210905] [0x000025c8] [info]    Registered asset package: Globe
[2022-11-06 18:07:34.210905] [0x000025c8] [info]    Registered asset package: Movers
void StateSet::setGlobalDefaults() ShaderPipeline disabled.

when I run any app from Examples.
I used conan to build this.
The exact commands are somehow like this. Apologies I never used conan before, so found all these commands searching online.

pip install conan
conan install . --install-folder C:\Softwares\Skybolt-master\Skybolt-build --build=missing
conan build --install-folder C:\Softwares\Skybolt-master\Skybolt-install --build-folder C:\Softwares\Skybolt-master\Skybolt-build .

IMO I dont think that the above error is the reason for the message void StateSet::setGlobalDefaults() ShaderPipeline disabled. as it appears while building FftOceanTests.exe
Do you know what might be the problem here?

Thanks.

@matthew-reid
Copy link
Contributor

The StateSet::setGlobalDefaults() ShaderPipeline disabled message is information logged by OSG but not an indication of a problem because Skybolt does not use the OSG ShaderPipeline. I'll remove this message in a future version.

Regarding the compilation errors, I wonder if the issue might be related to compiling OSG as a static library. Which compiler version are you using? As a workaround you could try building the shared version of OSG by adding the -o openscenegraph-mr:shared=True argument to conan install.

I also notice you're running conan build with an --install-folder argument which doesn't match your install folder from conan install. You should be able to run conan build without only the build-folder argument, e.g:

conan install . --install-folder C:\Softwares\Skybolt-master\Skybolt-build -o openscenegraph-mr:shared=True --build=missing
conan build C:\Softwares\Skybolt-master\Skybolt-build .

@parzival2
Copy link
Author

Thank you very much for the help. Its working now. I was able to run the provided examples.
Its working with conan, now I just have to build it using CMake so that I can have more control over everything.
Thanks again for the help. I am closing the issue since its resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants