Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
-
- Posts: 250
- Joined: 22 Jul 2006, 19: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?
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?
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.
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,
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!
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: 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)"
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: 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)
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!
-
- Posts: 250
- Joined: 22 Jul 2006, 19: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)
I found where all the classes involed were declered and made sure all the files were getting compiled so im clueless.
Any ideas?
But now im getting stuff like this: (7 in all)
Code: Select all
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)
Any ideas?
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
Tobi said this on the mailing list.Sean Mirrsen wrote:What could be the reason for me getting an "error 400:bad request" when trying to update from repository?
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
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
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..
-
- Posts: 250
- Joined: 22 Jul 2006, 19:58
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?
Map is small divide.
Anyone have any ideas?
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
scons + mingw returns this for me at what I think is the end of the compilation process:
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.
Code: Select all
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.
EDIT: The problem seems to have solved itself.