From Marco Jez, hack/fix for VS compile/link problems related to STL containers.

This commit is contained in:
Robert Osfield
2005-12-02 00:25:40 +00:00
parent 784574670e
commit 8d8229cc05
6 changed files with 127 additions and 47 deletions

View File

@@ -42,33 +42,6 @@
# define OSG_EXPORT
#endif
// export template instances for basic types
#if (_MSC_VER >= 1300) && !defined( OSG_LIBRARY_STATIC )
#include <vector>
#if defined( OSG_LIBRARY )
template class __declspec(dllexport) std::allocator<int>; // GLsizei
template class __declspec(dllexport) std::vector<int, std::allocator<int> >; // GLsizei
template class __declspec(dllexport) std::allocator<unsigned char>; // GLubyte
template class __declspec(dllexport) std::vector<unsigned char, std::allocator<unsigned char> >; // GLubyte
template class __declspec(dllexport) std::allocator<unsigned short>; // GLushort
template class __declspec(dllexport) std::vector<unsigned short, std::allocator<unsigned short> >; // GLushort
template class __declspec(dllexport) std::allocator<unsigned int>; // GLuint
template class __declspec(dllexport) std::vector<unsigned int, std::allocator<unsigned int> >; // GLuint
#else
#pragma warning ( push )
#pragma warning ( disable : 4231 )
extern template class __declspec(dllimport) std::allocator<int>; // GLsizei
extern template class __declspec(dllimport) std::vector<int, std::allocator<int> >; // GLsizei
extern template class __declspec(dllimport) std::allocator<unsigned char>; // GLubyte
extern template class __declspec(dllimport) std::vector<unsigned char, std::allocator<unsigned char> >; // GLubyte
extern template class __declspec(dllimport) std::allocator<unsigned short>; // GLushort
extern template class __declspec(dllimport) std::vector<unsigned short, std::allocator<unsigned short> >; // GLushort
extern template class __declspec(dllimport) std::allocator<unsigned int>; // GLuint
extern template class __declspec(dllimport) std::vector<unsigned int, std::allocator<unsigned int> >; // GLuint
#pragma warning ( pop )
#endif
#endif
// set up define for whether member templates are supported by VisualStudio compilers.
#ifdef _MSC_VER
# if (_MSC_VER >= 1300)