Errors with Visual Studio 2008 Pro

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
mgstrein
Star Pilot
Star Pilot
Posts: 5
Joined: Sat Jul 12, 2008 10:39 pm
Location: Seattle
Contact:

Errors with Visual Studio 2008 Pro

Post by mgstrein »

I am trying to build with Visual Stuido 2008 Pro and running into an interesting problem. I am wondering if anyone else has seen this before. When I try to build the vega strike project I get a ton of errors similar to the following:

1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(115) : error C2535: 'const char (*std::allocator<_Ty>::address(const char (&)[9]) const)[9]' : member function already defined or declared
1> with
1> [
1> _Ty=const char [9]
1> ]
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory(109) : see declaration of 'std::allocator<_Ty>::address'
1> with
1> [
1> _Ty=const char [9]
1> ]
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\xtree(137) : see reference to class template instantiation 'std::allocator<_Ty>' being compiled
1> with
1> [
1> _Ty=const char [9]
1> ]
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\map(78) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<const char [9],unsigned int,std::less<const char [9]>,std::allocator<std::pair<const char [9],unsigned int>>,false>
1> ]
1> m:\sandbox\vegastrike\vega-proj\include\hash_map(9) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
1> with
1> [
1> _Kty=const char [9],
1> _Ty=unsigned int
1> ]
1> m:\sandbox\vegastrike\vegastrike\src\sharedpool.h(18) : see reference to class template instantiation 'stdext::hash_map<KEY,VALUE>' being compiled
1> with
1> [
1> KEY=const char [9],
1> VALUE=unsigned int
1> ]
1> m:\sandbox\vegastrike\vegastrike\src\universe_generic.h(198) : see reference to class template instantiation 'SharedPool<T,RefcounterTraits>' being compiled
1> with
1> [
1> T=const char [9],
1> RefcounterTraits=stdext::hash_compare<const char [9]>
1> ]

I know it looks really messy but it gets traced back to a string equals check in teh universe_generic.h file. What is even more interesting is that if I tinker around with the order in which the header files are included I can fix some of the issues. I really hate debugging build issues like this and since I can build on my 2005 install I don't think I want to spend much more time on this unless this has been seen before and there is an easy fix.

Thanks

Michael
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: Errors with Visual Studio 2008 Pro

Post by ace123 »

vega-proj is for Visual Studio 6.0 (1998). In fact that whole directory should be renamed or deleted. I'm amazed your build got as far as it did.

What you want to use is vega-vc8, and import the project for vc9.
Unfortunately the Python DLL is compiled for VC8, and therefore is not directly compatible (may cause a crash on startup)

If you run into the python crash, see here for what I think is the solution: http://vegastrike.sourceforge.net/forum ... 20#p108220
mgstrein
Star Pilot
Star Pilot
Posts: 5
Joined: Sat Jul 12, 2008 10:39 pm
Location: Seattle
Contact:

Re: Errors with Visual Studio 2008 Pro

Post by mgstrein »

It compiles now. Once I pointed it at the right folder for includes it worked no problem. I told it to use python 2.6. I build with those headers linked with those libs and dropped the 2.6 dll in the win32 folder. I didn't get an AV/Seg fault on start up. Was that the problem you were refering to, or is there a command line option that will still expose errors? This seems like a seperate issue. We can talk about it on a seperate thread or you can pm me if you want.

-Michael
Post Reply