Compiling spring (mingw and visual studio 7/8) - Page 7

Compiling spring (mingw and visual studio 7/8)

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

If you don't give a class with any virtual methods no destructor, the compiler will generate a non-virtual empty default one.
On MSVC, this empty default destructor (if it's even there) is located at the DLL and doesn't give any problems. For MSVC, what AF says is right. We shouldn't have any destructor at all in msvc for the DECLARE_PURE_VIRTUAL macro, that would restore it back to original.
This happened to work, but it would silently break and crash hard in case you'd ever use multiple or virtual inheritance.
So, we don't use that, problem solved ;)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Maybe I'll make an AI sometime using multiple inheritance just to show the badness of the code :twisted: :twisted:
User avatar
EXit_W0und
Posts: 164
Joined: 22 Dec 2005, 01:33

boost libs

Post by EXit_W0und »

can you add the link to the v8 boost libraries to the front of the sticky. Some folk are still having trouble finding it. cheers

http://fileuniverse.com/?p=showitem&ID=2416.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

How come my boost folder is nearly 2GB yet that downlaod is 9MB?!?!?!?!?
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Spring only needs boost thread, boost filesystem and boost regex, and not the insanely huge wave/serialization or any other boost crap.
am0kk
Posts: 14
Joined: 11 Jul 2006, 07:51

Post by am0kk »

I am having a problem getting the source to compile using VS8. I have followed as much of the steps listed previously as i can.


My final build lists 7 errors ~1000 warnings.

I am not sure what to do next :(

This is a sample of the error from the build log.

VFSHandler.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::re_detail::perl_matcher<class std::_...

ArchiveDir.obj : error LNK2001: unresolved external symbol "public: __thiscall boost::re...


All other errors are the same..

any ideas?
peous
Posts: 16
Joined: 11 Jul 2006, 00:21

Post by peous »

nice libs jcnossen.
i compiled the lastest sources of SVN and i repaired the project for visual8 so everything compiles. if anyone is intersted, follow the link below.
http://www.peous.com/temp/rts_vcproj_071206.zip

i have put boost (see post of EXit_W0und above) on vclibs\Boost
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Woo, I *almost* got Spring to compile - I had 3 errors. YTwo of them were the dsound.h error - currently downloading the joyfun 450MB of DX SDK to fix them. So the remaining error is:

Code: Select all

../../../lua/luabind\luabind/object.hpp(42) : fatal error C1083: Cannot open include file: 'boost/python/detail/is_xxx.hpp': No such file or directory
Any ideas where I can get this file / what it is?
peous
Posts: 16
Joined: 11 Jul 2006, 00:21

Post by peous »

this file is included in boost distribution here:
http://fileuniverse.com/?p=showitem&ID=2416
If you sue my VC8 project, be sure to habe it installed in "Boost" Directory. (on my disk D:\Projets\TASpring\vclibs\Boost\include\boost\python\detail)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Peous, I hope your not trying to replicate my spelling now
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Cheers peous, will try that now. I'm using Visual Studio 2005 Professional Edition if that makes a difference to anything...

Edit - ok the versino of the DirectX SDK I got was wrong - I got http://www.microsoft.com/downloads/deta ... laylang=en but that doesn't work on Win2k which I use - any idea where I can find the win2k version? It's not obvious on the MS website...

Is this right? I'm loathe to download another large file if it's not the right one... http://www.microsoft.com/downloads/deta ... layLang=en
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

This is the correct version of the DirectX SDK if you are using Win2k:

http://www.microsoft.com/downloads/deta ... layLang=en
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Ok,

I think I'm getting close. the least error I had was about IconHandler.cpp being missing - I removed the reference to it in the project file since I can't find it in the latest svn. So now, I have 15 unresolved external symbols - please can anyone shed some ligh ton what's going on here...

Code: Select all

Game.obj : error LNK2001: unresolved external symbol "class CIconHandler * iconHandler" (?iconHandler@@3PAVCIconHandler@@A)
UnitDrawer.obj : error LNK2001: unresolved external symbol "class CIconHandler * iconHandler" (?iconHandler@@3PAVCIconHandler@@A)
Game.obj : error LNK2019: unresolved external symbol "public: __thiscall CIconHandler::CIconHandler(void)" (??0CIconHandler@@QAE@XZ) referenced in function "public: __thiscall CGame::CGame(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0CGame@@QAE@_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
...<snip>...
ReadMap1.obj : error LNK2019: unresolved external symbol "public: __thiscall CSm3ReadMap::CSm3ReadMap(void)" (??0CSm3ReadMap@@QAE@XZ) referenced in function "public: static class CReadMap * __cdecl CReadMap::LoadMap(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadMap@CReadMap@@SAPAV1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
../../../game/debug.exe : fatal error LNK1120: 15 unresolved externals
I'm also getting a ton of warnings like these two:

Code: Select all

FBO.obj : warning LNK4049: locally defined symbol ___glewGenFramebuffersEXT imported
WinPBuffer.obj : warning LNK4049: locally defined symbol ___wglewGetPbufferDCARB imported
Again, any ideas what these are about? Thanks for your help in advance, I can almost taste my exe...
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Right then, I have solved most of the errors of underfined symbols - there were some source files not being compiled. I've asdded them to the project file and it's better. However, there's still 2 unresolved symbols and I can't find what they're from - something to do with Windows I think but I cant find where they're defined:

Code: Select all

Game.obj : error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t::Data_t::Data_t(char const *)" (??0Data_t@_bstr_t@@QAE@PBD@Z)
GUIgame.obj : error LNK2001: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
AVIGenerator.obj : error LNK2001: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
Game.obj : error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: char const * __thiscall _bstr_t::Data_t::GetString(void)const " (?GetString@Data_t@_bstr_t@@QBEPBDXZ)
GUIgame.obj : error LNK2001: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z)
AVIGenerator.obj : error LNK2001: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z)
../../../game/debug.exe : fatal error LNK1120: 2 unresolved externals
Where do I get them from? All help appreciated!
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

OK I needed to explicitly make the linker use the comsuppw.lib and it now compiles! WooT!
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Ok, So I've compiled the release version and ran the air combat test and get a strange effect with the graphics - the transparancy in some of the textures doesn't seem to be working. I have an image but I don't have any webspace. Basically the transparant part sof the texture are blakc, so damaged aircraft smoke trails are surrounded by black boxes. The whole texture (black border and smoke) fades away to transparant though as it gets old... this is with r1667. Explosions are displayed ok, it just seems smoke is the problem.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Thanks AF

Here's the problem:
Image
Tim-the-maniac
Posts: 250
Joined: 22 Jul 2006, 19:58

Post by Tim-the-maniac »

I am trying to compile the lastest source from svn using visual c++ 2005 express edition and am only getting 1 error at the moment:
LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc80-mt-1_33.lib'

I have the vlibs from the first page of this thread but that contains the the vc71 version of the file and also the vs8 copy of boost off FU but that version is 1_33_1. If only i could merge the 2 together :)

Any idea where to get the right file from?
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

The version of Boost I used was the vs8 given a page or two back - that contains libboost_thread-vc80-mt-1_33_1.lib which seems to work - I can compile without errors.

As far as I know you only need one versino of boost - you should be albe to delete the vs7.1 vclibs and just use the vs8 vclibs...
Post Reply

Return to “Engine”