mosra / magnum-bootstrap

Bootstrap projects for the Magnum C++11 graphics engine
https://magnum.graphics/
The Unlicense
92 stars 37 forks source link

Linking issue with scenegraph3D bootstrap project #3

Closed severin-lemaignan closed 11 years ago

severin-lemaignan commented 11 years ago

Compilation of the bootstrap project scenegraph3D fails at link stage with this error:

Linking CXX executable MyApplication
CMakeFiles/MyApplication.dir/MyApplication.cpp.o: In function `Magnum::SceneGraph::BasicCamera3D<float>::setAspectRatioPolicy(Magnum::SceneGraph::AspectRatioPolicy)':
/home/lemaigna/src/augmentedreality/src/MyApplication.cpp:(.text._ZN6Magnum10SceneGraph13BasicCamera3DIfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE[_ZN6Magnum10SceneGraph13BasicCamera3DIfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE]+0x25): undefined reference to `Magnum::SceneGraph::AbstractCamera<3u, float>::setAspectRatioPolicy(Magnum::SceneGraph::AspectRatioPolicy)'

Tested with both GCC 4.7 and clang 3.1, both on Ubuntu 13.04 64bits.

Note that:

0000000000013470 W _ZN6Magnum10SceneGraph13BasicCamera2DIfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE
0000000000013ac0 W _ZN6Magnum10SceneGraph13BasicCamera3DIfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE
0000000000011f30 t _ZN6Magnum10SceneGraph14AbstractCameraILj2EfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE
00000000000127a0 t _ZN6Magnum10SceneGraph14AbstractCameraILj3EfE20setAspectRatioPolicyENS0_17AspectRatioPolicyE

Steps to reproduce:

$ git clone https://github.com/mosra/magnum-bootstrap.git -b scenegraph3D
$ cd magnum-bootstrap && mkdir build $$ cd build
$ cmake ..
$ make

The exact same linking error also occurs when compiling magnum-examples/src/viewer.

mosra commented 11 years ago

Should be fixed with mosra/magnum@61af376fda7a9e2a686ce4fa38277f7733182b2b. Please reopen if the issue persists.