Tons of compilation warnings

Hi everyone, this is my first post on the forum, the community seems pretty helpful so I figured I’d come here for help :smiley:.

I started using Panda3D today. Everything runs fine, I was able to run the code found in the manual without any problem.

However, when I compile, I always get a slew of dll-related warnings (no error). All C4506, C4251 and C4275.

1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(46) : warning C4506: no definition for inline function 'BitMask<WType,nbits> BitMask<WType,nbits>::all_on(void)'
1>        with
1>        [
1>            WType=PN_uint32,
1>            nbits=32
1>        ]

1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(439) : warning C4251: 'std::_Container_base_aux_alloc_real<_Alloc>::_Alaux' : class 'pallocator_array<Type>' needs to have dll-interface to be used by clients of class 'std::_Container_base_aux_alloc_real<_Alloc>'
1>        with
1>        [
1>            _Alloc=pallocator_array<GraphicsWindowInputDevice>
1>        ]
1>        and
1>        [
1>            Type=std::_Aux_cont
1>        ]
1>        and
1>        [
1>            _Alloc=pallocator_array<GraphicsWindowInputDevice>
1>        ]

1>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(439) : warning C4275: non dll-interface class 'std::_Container_base_aux' used as base for dll-interface class 'std::_Container_base_aux_alloc_real<_Alloc>'
1>        with
1>        [
1>            _Alloc=pallocator_array<GraphicsWindowInputDevice>
1>        ]
1>        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xutility(377) : see declaration of 'std::_Container_base_aux'
1>        d:\librairies\panda3d-1.7.0\include\vector_src.h(64) : see reference to class template instantiation 'std::vector<_Ty,_Ax>' being compiled
1>        with
1>        [
1>            _Ty=GraphicsWindowInputDevice,
1>            _Ax=pallocator_array<GraphicsWindowInputDevice>
1>        ]

(I get 10-15 of them every time I include pandaFramework.h or pandaSystem.h somewhere.)

Everything runs fine if I ignore them but it’s a bit of a let down to see these warnings appear everywhere I include panda headers in my code. I’m having a hard time finding real warnings and errors through the debug log with all these warnings popping up.

I searched around in the forum but the only thing I could find was someone saying C4275s were “normal” and should be ignored.

Is there a way to truly eliminate these warnings and are they really “normal”? If they are normal, do you guys just ignore them or globally disable them?

I’m on Win7, Visual Studio 2008 with the latest Panda SDK (1.7.0). I’m aware the C4251 and C4275 can be safely ignored since they’re from std classes I’m a bit worried about the C4506 ones. I mostly want to make sure I’m not doing something wrong and that other people have these warnings :stuck_out_tongue:.

Many thanks!

Hmm, those warnings are news to me. Something might indeed be wrong. I’ll have to try to replicate your environment to be sure.

David

Alright, I’m trying to install panda on another computer (with VS2008 again) to see if it does the same thing. This one is from a clean OS install.

I’ll upload a minimal example that reproduces the warnings if I still have them. Otherwise I’ll try to find what’s wrong with my other machine :.

Thanks for the quick answer David!

Btw I get the same warnings with the 1.7.0 SDK.

they appear everytime I include the above mentioned header files.

I am currently building my own debug/release version of Panda anyway, didn’t check if it happens with those versions as well though.

By briefly looking at the MSDN, it seems that such warnings appear when DLLs are importing STL data, and that seems to be the case in Panda3d, so yeah, I guess if it really means that much, you’re going to have to recompile Panda3d from source without the use of STL data in the DLLs. However, if you do manage to bypass these warnings (without disabling them :p) I would really appreciate if you would tell me how :slight_smile:

Same here with the STL warnings, and I did see the posts that said to ignore them.

One tip if you don’t know already for finding your errors in Visual Studios right after a compile ( or click mouse in the error/warning window ) and then type “error” in the search box just below the menu bar at top of window, it will search the compile logs just like the code window. That’s what I do to cut through all those warnings.