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



All times are UTC + 1 hour


Post new topic Reply to topic  [ 582 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 30  Next
Author Message
 Post subject:
PostPosted: 23 Jul 2006, 01:16 

Joined: 22 Jul 2006, 18:58
Ok renaming some files worked, and now i get the same kind of errors which Acidd reported a few posts back:
VFSHandler.obj : error LNK2001: unresolved external symbol...
and loads of others all concerning .obj stuff.

So Acidd you said you solved it by adding some source files to the project.
How did you find which files were'nt compiling/fix it?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 23 Jul 2006, 09:08 
User avatar

Joined: 23 Apr 2006, 01:15
Ok, there's two possibilities.

Here's my solution to the first - for each of the unresolved symbol errors, what I did was search the Spring trunk for files containing the relevant class name. E.g.

Code:
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)"


so here, it's looking for a class called CIconHandler, but can't find it. So search through your spring source dir for a file containing that class's name (in this case it's the file rts/Rendering/IconHandler.cpp and the header). Then just drag the file into the 'solution explorer' in the right place. VS should then compile the class at build and not complain about unresolved external symbol.

Secondly, there were a few functions that come from libraries that not in the spring source. These are libraries from the Windows platform SDK and the DirectX SDK. For example,

Code:
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)


Here, I searched google for "ConvertStringToBSTR" and found other people on other projects had the same problem. For some reason, I needed to explicitly add comsuppw.lib to the library files in project properties->configuration->linker->input files->additional dependancies

You will probably have to do the same with dsound.lib.

----

Other things I had to do get rid of other errors:

You'll also need to add the paths for the DirectX and win platform SDK headers and libraries into the project configuration if you havent already:

project properties->configuration->c++->general->additional inc dirs
project properties->configuration->linker->general->additional lib dirs

Finally, for some reason it tries to find libc.lib as a default libray but cannot find it, so you need to force it to ignore libc.lib:

properties->configuration->linker->input files->ignore specific lib

Hope that helps!


Top
 Offline Profile  
 
 Post subject:
PostPosted: 23 Jul 2006, 16:19 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
I wonder why it needs the directX sdk if we dont use directX? Afterall we use OpenGl and OpenAL for our sound/graphics and have done since the linux port was merged into the trunk code.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 23 Jul 2006, 16:38 
User avatar

Joined: 05 Jun 2005, 18:13
Location: NL
No we still use directsound. 0.70b1 used OpenAL iirc, but it was buggy as hell so I switched it back.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 23 Jul 2006, 23:27 

Joined: 22 Jul 2006, 18:58
Thanks to acidd who helped me kill loads of errors when he was in the lobby
But now im getting stuff like this: (7 in all)
Code:
WinPBuffer.obj : error LNK2019: unresolved external symbol __imp__GetPixelFormat@4 referenced in function "public: __thiscall WinPBuffer::WinPBuffer(int)" (??0WinPBuffer@@QAE@H@Z)
BeamLaser.obj : error LNK2019: unresolved external symbol "public: __thiscall CLargeBeamLaserProjectile::CLargeBeamLaserProjectile(class float3 const &,class float3 const &,class float3 const &,class float3 const &,class CUnit *,float,float,float,float,float,float,struct AtlasedTexture *,struct AtlasedTexture *)" (??0CLargeBeamLaserProjectile@@QAE@ABVfloat3@@000PAVCUnit@@MMMMMMPAUAtlasedTexture@@2@Z) referenced in function "public: virtual void __thiscall CBeamLaser::Fire(void)" (?Fire@CBeamLaser@@UAEXXZ)
RegHandler.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function "public: virtual __thiscall RegHandler::~RegHandler(void)" (??1RegHandler@@UAE@XZ)


I found where all the classes involed were declered and made sure all the files were getting compiled so im clueless.
Any ideas?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 24 Jul 2006, 17:35 

Joined: 19 Aug 2004, 16:38
Location: Togliatti, Russia
What could be the reason for me getting an "error 400:bad request" when trying to update from repository?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 27 Jul 2006, 16:18 

Joined: 09 Jan 2006, 17:51
Sean Mirrsen wrote:
What could be the reason for me getting an "error 400:bad request" when trying to update from repository?


Tobi said this on the mailing list.
Tobi wrote:
Hi,

For your information, the berlios svn server is full, ie. no one can commit
currently. I've sent an e-mail to berlios staff already, so no need to do
that again.

Hopefully they install a new disk soon.

Tobi


Top
 Offline Profile  
 
 Post subject:
PostPosted: 27 Jul 2006, 16:31 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
update should work fine tho (and does so here), you just can't commit anymore (unless you're lucky like JC a moment ago that theres a few 100K free :-))


Top
 Offline Profile  
 
 Post subject:
PostPosted: 27 Jul 2006, 20:44 

Joined: 19 Aug 2004, 16:38
Location: Togliatti, Russia
Well, I told JC to commit whatever I had uploaded so I could painlessly nuke my working copy and re-checkout, it looks like it got fudged up somehow. Then again, it might be just my PC, and/or the SmartSVN thingy, but I'll reinstall the OS as soon as it crashes again, so I hope to solve those problems eventually.. :P


Top
 Offline Profile  
 
 Post subject:
PostPosted: 30 Jul 2006, 03:17 

Joined: 11 Jul 2006, 06:51
For Tim-E- :D


the largebeamlaser.cpp and .h arent included in the project file, all you need to do is drag and drop those two files from the sim/projectiles folder to the sim/projectiles folder in VS :D


As for the other errors :|


Top
 Offline Profile  
 
 Post subject:
PostPosted: 30 Jul 2006, 16:41 

Joined: 22 Jul 2006, 18:58
I've fixed all the errors now thanks :-)
Stupid me forgot to do that alteration needed when using the platform SDK :oops:


Top
 Offline Profile  
 
 Post subject:
PostPosted: 30 Jul 2006, 19:29 
User avatar

Joined: 23 Apr 2006, 01:15
Glad you've got it working Ray :-)


Top
 Offline Profile  
 
 Post subject:
PostPosted: 31 Jul 2006, 00:55 

Joined: 11 Jul 2006, 06:51
Not sure if I've done anything wrong... I have successfully built spring from the latest svn, however when I play a game with the built executable, either using random enemies script, air combat test or with an ai ( kai/ntai) I get a hard crash and reboot....

Map is small divide.


Anyone have any ideas?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 31 Jul 2006, 07:53 
User avatar

Joined: 23 Apr 2006, 01:15
Rebuild in debug mode and see if ti still happens - if so, then use breakpoints / stepthrough to try to work out where it's crashing...


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 04:23 
User avatar

Joined: 29 Apr 2005, 06:46
why are there so many external dependancies in this project... can't these be narrowed down... at all?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 08:07 
User avatar

Joined: 23 Apr 2006, 01:15
For example?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 08:20 

Joined: 11 Jul 2006, 06:51
Perhaps, if it is possible by putting the directx and platform sdk libs and headers in the vclibs folder as well...


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 08:33 
AI Coder
User avatar

Joined: 14 Sep 2004, 10:32
Location: Cookieland
The platform SDK alone can reach upto 2GB And For me the DirectX 9 SDK was at least 900MB.

Considering the spring svn main trunk si 15MB............


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 11:16 

Joined: 11 Jul 2006, 06:51
But of all the content in those SDKs, how many libraries are actually used?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 01 Aug 2006, 11:32 
User avatar

Joined: 19 Nov 2004, 20:38
Location: in die buerse al sonder naet,daer men die beyaert mede slaet.
scons + mingw returns this for me at what I think is the end of the compilation process:
Code:
build\rts\lib\minizip\minizip.o(.text+0xc9):minizip.c: multiple definition of `d
o_banner'
build\rts\lib\minizip\miniunz.o(.text+0x1e8):miniunz.c: first defined here
build\rts\lib\minizip\minizip.o(.text+0xe9):minizip.c: multiple definition of `d
o_help'
build\rts\lib\minizip\miniunz.o(.text+0x208):miniunz.c: first defined here
build\rts\lib\minizip\minizip.o(.text+0x1e0):minizip.c: multiple definition of `
main'
build\rts\lib\minizip\miniunz.o(.text+0x967):miniunz.c: first defined here
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
scons: building terminated because of errors.


I'm quite new to this, so I'm not sure how to solve the problem. Any tips would be appreciated.

EDIT: The problem seems to have solved itself.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 582 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11 ... 30  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.