Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
For commandline gdb:
then, inside gdb, for example:
There are also various frontends to gdb available AFAIK.
Code: Select all
gdb spring.exe
Code: Select all
run
*** wait till it crashes
thread apply all backtrace
quit
- hughperkins
- AI Developer
- Posts: 836
- Joined: 17 Oct 2006, 04:14
I have tried to compile 0.74b2 and I got this :
config.log error:
what does it mean by permission denied ?
when renaming the rts\Map directory to maps (or something else that is not "map") it seems to succeed :
but the last message repeats itself when trying to run scons and does not compile
Code: Select all
scons: Reading SConscript files ...
Now configuring. If something fails, consult `config.log' for details.
Detected platform : windows
Checking gcc version... 4.2.0
profiling NOT enabled, debugging NOT enabled, level 2 optimizing enabled
Checking configure scripts
Checking for Freetype2...
Checking for freetype-config... Guessing Freetype2 include path... mingwlibs
\include\freetype2 D:\mingw\include\freetype2
Checking for SDL...
Checking for sdl-config... Guessing SDL include path... mingwlibs\include\SD
L D:\mingw\include\SDL
Checking for Python 2.4...
Guessing Python include path... mingwlibs\include\python2.4 D:\mingw\include\p
ython2.4
Checking header files
Checking for C header file zlib.h... yes
Checking for C header file ft2build.h... yes
Checking for C header file SDL/SDL.h... yes
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for C header file GL/glew.h... yes
Checking for C++ header file boost/cstdint.hpp... yes
Checking for C++ header file boost/thread.hpp... yes
Checking for C++ header file boost/regex.hpp... no
Cannot find Boost regex header
Code: Select all
Checking for C++ header file boost/regex.hpp... build\sconf_temp\conftest_8.cpp <-
|
|#include "boost/regex.hpp"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Ilua\luabind -Ilua\lua\include -Imingwlibs\include -ID:\mingw\bin\include -Imingwlibs\include\freetype2 -ID:\mingw\bin\include\freetype2 -Imingwlibs\include\SDL -ID:\mingw\bin\include\SDL -Imingwlibs\include\python2.4 -ID:\mingw\bin\include\python2.4 -c -o build\sconf_temp\conftest_8.o build\sconf_temp\conftest_8.cpp
In file included from mingwlibs/include/boost/regex/v4/regex.hpp:32,
from mingwlibs/include/boost/regex.hpp:31,
from build\sconf_temp\conftest_8.cpp:2:
mingwlibs/include/boost/regex/v4/regex_workaround.hpp:35:15: error: rts/map: Permission denied
In file included from mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:39,
from mingwlibs/include/boost/regex/v4/regex_traits.hpp:39,
from mingwlibs/include/boost/regex/regex_traits.hpp:27,
from mingwlibs/include/boost/regex/v4/regex.hpp:39,
from mingwlibs/include/boost/regex.hpp:31,
from build\sconf_temp\conftest_8.cpp:2:
mingwlibs/include/boost/regex/pending/object_cache.hpp:41: error: ISO C++ forbids declaration of 'map' with no type
mingwlibs/include/boost/regex/pending/object_cache.hpp:41: error: typedef name may not be a nested-name-specifier
mingwlibs/include/boost/regex/pending/object_cache.hpp:41: error: expected ';' before '<' token
mingwlibs/include/boost/regex/pending/object_cache.hpp:42: error: 'map_type' has not been declared
mingwlibs/include/boost/regex/pending/object_cache.hpp:52: error: 'map_type' does not name a type
mingwlibs/include/boost/regex/pending/object_cache.hpp: In static member function 'static boost::shared_ptr<U> boost::object_cache<Key, Object>::do_get(const Key&, typename std::list<std::pair<boost::shared_ptr<U>, const Key*>, std::allocator<std::pair<boost::shared_ptr<U>, const Key*> > >::size_type)':
mingwlibs/include/boost/regex/pending/object_cache.hpp:99: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/pending/object_cache.hpp:103: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/pending/object_cache.hpp:108: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/pending/object_cache.hpp:109: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/pending/object_cache.hpp:109: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/pending/object_cache.hpp:110: error: base operand of '->' is not a pointer
In file included from mingwlibs/include/boost/regex/v4/regex_traits.hpp:39,
from mingwlibs/include/boost/regex/regex_traits.hpp:27,
from mingwlibs/include/boost/regex/v4/regex.hpp:39,
from mingwlibs/include/boost/regex.hpp:31,
from build\sconf_temp\conftest_8.cpp:2:
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: At global scope:
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:221: error: ISO C++ forbids declaration of 'map' with no type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:221: error: typedef name may not be a nested-name-specifier
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:221: error: expected ';' before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:222: error: 'map_type' has not been declared
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:256: error: 'map_type' does not name a type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'boost::regex_constants::syntax_type boost::re_detail::cpp_regex_traits_char_layer<charT>::syntax_type(charT) const':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:238: error: 'm_char_map' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:239: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'boost::regex_constants::escape_syntax_type boost::re_detail::cpp_regex_traits_char_layer<charT>::escape_syntax_type(charT) const':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:243: error: 'm_char_map' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:250: error: base operand of '->' is not a pointer
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'void boost::re_detail::cpp_regex_traits_char_layer<charT>::init()':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:294: error: 'm_char_map' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:313: error: 'm_char_map' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: At global scope:
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:445: error: ISO C++ forbids declaration of 'map' with no type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:445: error: invalid use of '::'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:445: error: expected ';' before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:446: error: ISO C++ forbids declaration of 'map' with no type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:446: error: invalid use of '::'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:446: error: expected ';' before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:447: error: ISO C++ forbids declaration of 'map' with no type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:447: error: invalid use of '::'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:447: error: expected ';' before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'std::string boost::re_detail::cpp_regex_traits_implementation<charT>::error_string(boost::regex_constants::error_type) const':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:421: error: 'm_error_strings' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:423: error: 'map' is not a member of 'std'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:423: error: expected primary-expression before 'int'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:423: error: expected `;' before 'int'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:424: error: 'p' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'typename boost::re_detail::cpp_regex_traits_implementation<charT>::string_type boost::re_detail::cpp_regex_traits_implementation<charT>::lookup_collatename(const charT*, const charT*) const':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:588: error: 'map' in namespace 'std' does not name a type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:588: error: expected unqualified-id before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:589: error: 'm_custom_collate_names' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:591: error: 'iter_type' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:591: error: expected `;' before 'pos'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:592: error: 'pos' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'void boost::re_detail::cpp_regex_traits_implementation<charT>::init()':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:675: error: 'm_error_strings' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp: In member function 'typename boost::re_detail::cpp_regex_traits_implementation<charT>::char_class_type boost::re_detail::cpp_regex_traits_implementation<charT>::lookup_classname_imp(const charT*, const charT*) const':
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:785: error: 'm_custom_class_names' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:787: error: 'map' in namespace 'std' does not name a type
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:787: error: expected unqualified-id before '<' token
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:788: error: 'map_iter' was not declared in this scope
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:788: error: expected `;' before 'pos'
mingwlibs/include/boost/regex/v4/cpp_regex_traits.hpp:789: error: 'pos' was not declared in this scope
scons: *** [build\sconf_temp\conftest_8.o] Error 1
no
Failed program was:
1:
2: #include "boost/regex.hpp"
3:
Error message: failed to compile test program
when renaming the rts\Map directory to maps (or something else that is not "map") it seems to succeed :
Code: Select all
scons: Reading SConscript files ...
Now configuring. If something fails, consult `config.log' for details.
Detected platform : windows
Checking gcc version... 4.2.0
profiling NOT enabled, debugging NOT enabled, level 2 optimizing enabled
Checking configure scripts
Checking for Freetype2...
Checking for freetype-config... Guessing Freetype2 include path... mingwlibs
\include\freetype2 D:\mingw\include\freetype2
Checking for SDL...
Checking for sdl-config... Guessing SDL include path... mingwlibs\include\SD
L D:\mingw\include\SDL
Checking for Python 2.4...
Guessing Python include path... mingwlibs\include\python2.4 D:\mingw\include\p
ython2.4
Checking header files
Checking for C header file zlib.h... yes
Checking for C header file ft2build.h... yes
Checking for C header file SDL/SDL.h... yes
Checking for C header file GL/gl.h... yes
Checking for C header file GL/glu.h... yes
Checking for C header file GL/glew.h... yes
Checking for C++ header file boost/cstdint.hpp... yes
Checking for C++ header file boost/thread.hpp... yes
Checking for C++ header file boost/regex.hpp... yes
Checking for C++ header file boost/spirit.hpp... yes
Checking for C header file IL/il.h... yes
Checking libraries
Checking for main() in C library GL... no
Checking for main() in C library opengl32... yes
Checking for main() in C library GLU... no
Checking for main() in C library glu32... yes
Checking for main() in C library z... yes
Checking for main() in C library freetype... yes
Checking for main() in C library python2.4... no
Checking for main() in C library python24... yes
Checking for main() in C library GLEW... no
Checking for main() in C library glew32... yes
Checking for main() in C library boost_thread-gcc-mt... no
Checking for main() in C library boost_thread-mt... yes
Checking for main() in C library boost_regex-gcc-mt... no
Checking for main() in C library boost_regex-mt... yes
Checking for main() in C library IL... no
Checking for main() in C library devil... yes
Checking for main() in C library imagehlp... yes
Checking for main() in C library dsound... yes
Checking for main() in C library gdi32... yes
Checking for main() in C library winmm... yes
Checking for main() in C library wsock32... yes
Checking for main() in C library ole32... yes
Checking for main() in C library mingw32... yes
Checking for main() in C library SDLmain... yes
Checking for main() in C library SDL... yes
Everything seems OK. Run `scons' now to build.
scons: *** Two different sets of overrides were specified for the same target: b
uild\rts\Rendering\Textures\Bitmap.o
File "SConstruct", line 116, in ?
That last error has been fixed already.
The first error (about rts/map) is because your compiler can't find the C++ maps header, so it tries to #include the directory [rts/map]. If you're using the mingw with gcc 4.1.1 which you advertised yourself, you need to specify an extra cpppath= variable to the directory that contains map, vector, deque etc. (don't have the path here, but should be something like c:\mingw\lib\gcc\include\c++, probably missing some pieces, but I'm sure you can figure it out)
The first error (about rts/map) is because your compiler can't find the C++ maps header, so it tries to #include the directory [rts/map]. If you're using the mingw with gcc 4.1.1 which you advertised yourself, you need to specify an extra cpppath= variable to the directory that contains map, vector, deque etc. (don't have the path here, but should be something like c:\mingw\lib\gcc\include\c++, probably missing some pieces, but I'm sure you can figure it out)
Code: Select all
set CPPPATH=D:\mingw\lib\gcc\mingw32\4.2.0\include\c++\
becaue if so it does not work, i have also tried to manually run the g++ command with -ID:\mingw\lib\gcc\mingw32\4.2.0\include\c++ did not work either. same problem.
BUT after manually modifying the files :
mingwlibs/include/boost/regex/pending/object_cache.hpp line 22
Code: Select all
#include<map>
Code: Select all
#include <..\..\mingw\lib\gcc\mingw32\4.2.0\include\c++\map>
mingwlibs/include/boost/regex/v4/regex_workaround.hpp line 35
Code: Select all
#include<map>
Code: Select all
#include <..\..\mingw\lib\gcc\mingw32\4.2.0\include\c++\map>
I don't get it, you say it does not find the c++ include files it requires, but if it didn't, fixing only this file's location would not have allowed these files to compile and should have made the error anyway, becaues according to what I am reading from these files, they include alote of things from that c++ directory not just the map file
no I ment as argument for scons configure, ie.
Code: Select all
scons configure cpppath=...
great everything worked, configure worked and it even started to compile, BUT during compile I got this :
when trying to compile version 3100
Code: Select all
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -
pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE
_DIRECTORY -DDIRECT_CONTROL_ALLOWED -DSTREFLOP_X87 -ID:\mingw\lib\gcc\mingw32\4.
2.0\include\c++ -Irts -Irts\System -Ilua\luabind -Ilua\lua\include -Imingwlibs\i
nclude -ID:\mingw\include -Imingwlibs\include\freetype2 -ID:\mingw\include\freet
ype2 -Imingwlibs\include\SDL -ID:\mingw\include\SDL -Imingwlibs\include\python2.
4 -ID:\mingw\include\python2.4 -c -o build\rts\Rendering\Textures\Bitmap.o rts\R
endering\Textures\Bitmap.cpp
In file included from rts\Rendering\Textures\Bitmap.cpp:14:
mingwlibs/include/IL/il.h:448: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:448: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:449: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:449: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:456: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:456: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:467: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:467: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:469: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:469: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:472: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:472: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:473: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:473: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:476: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:476: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:492: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:492: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:504: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:504: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:505: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:505: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:506: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:506: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h:521: error: '<anonymous>' has incomplete type
mingwlibs/include/IL/il.h:521: error: invalid use of 'ILvoid'
mingwlibs/include/IL/il.h: In constructor 'InitializeOpenIL::InitializeOpenIL()'
:
mingwlibs/include/IL/il.h:476: error: too few arguments to function 'ILvoid ilIn
it(<type error>)'
rts\Rendering\Textures\Bitmap.cpp:28: error: at this point in file
mingwlibs/include/IL/il.h: In destructor 'InitializeOpenIL::~InitializeOpenIL()'
:
mingwlibs/include/IL/il.h:521: error: too few arguments to function 'ILvoid ilSh
utDown(<type error>)'
rts\Rendering\Textures\Bitmap.cpp:31: error: at this point in file
mingwlibs/include/IL/il.h: In member function 'bool CBitmap::Load(const std::str
ing&, unsigned char)':
mingwlibs/include/IL/il.h:467: error: too few arguments to function 'ILubyte* il
GetData(<type error>)'
rts\Rendering\Textures\Bitmap.cpp:192: error: at this point in file
mingwlibs/include/IL/il.h: In member function 'bool CBitmap::LoadGrayscale(const
std::string&)':
mingwlibs/include/IL/il.h:467: error: too few arguments to function 'ILubyte* il
GetData(<type error>)'
rts\Rendering\Textures\Bitmap.cpp:239: error: at this point in file
scons: *** [build\rts\Rendering\Textures\Bitmap.o] Error 1
scons: building terminated because of errors.
hmm strange, I thought I put the fixed files in it. If you are in a hurry, remove ILvoid and ALCvoid from functions without arguments.
ie. they are now defined as
if they dont take any arguments.
Make it
and it should work.
But I'll probably update the mingwlibs package then if that indeed appears to be the problem (within a week or so).
ie. they are now defined as
Code: Select all
ILvoid foo(ILvoid);
Make it
Code: Select all
ILvoid foo();
But I'll probably update the mingwlibs package then if that indeed appears to be the problem (within a week or so).
damn ************
Code: Select all
d:/mingw/bin/../lib/gcc/mingw32/4.2.0/../../../../mingw32/bin/ld.exe: cannot find -lstreflop
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
scons: building terminated because of errors.
btw is there a "clean" option in the "makefile", oh and can I change the compile flags other than the ones included in the config script ?
you can see the full error on my site
Re: damn ************
monohouse wrote:btw is there a "clean" option in the "makefile", oh and can I change the compile flags other than the ones included in the config script ?
Code: Select all
scons -c
About the error, does a libstreflop.a or streflop.a exist in rts/lib/streflop? If so, which?
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
Error when linking:
Whoever solves this gets 10% of my soul.
Code: Select all
ext+0x162d):Terrain.cpp: undefined reference to `_imp__ilGetInteger@4'
build\rts\Map\SM3\terrain\Terrain.o(.text+0x164b):Terrain.cpp: undefined referen
ce to `_imp__ilGetInteger@4'
build\rts\Map\SM3\terrain\Terrain.o(.text+0x16cc):Terrain.cpp: undefined referen
ce to `_imp__ilDeleteImages@8'
build\rts\Map\SM3\terrain\Terrain.o(.text+0x16f4):Terrain.cpp: undefined referen
ce to `_imp__ilConvertImage@8'
build\rts\Map\SM3\terrain\Terrain.o(.text+0x1786):Terrain.cpp: undefined referen
ce to `_imp__ilGetData@0'
build\rts\Map\SM3\terrain\Terrain.o(.text+0x17df):Terrain.cpp: undefined referen
ce to `_imp__ilDeleteImages@8'
build\rts\Map\SM3\terrain\Textures.o(.text+0xc34):Textures.cpp: undefined refere
nce to `_imp__ilGenImages@8'
build\rts\Map\SM3\terrain\Textures.o(.text+0xc4c):Textures.cpp: undefined refere
nce to `_imp__ilBindImage@4'
build\rts\Map\SM3\terrain\Textures.o(.text+0xca4):Textures.cpp: undefined refere
nce to `_imp__ilTexImage@28'
build\rts\Map\SM3\terrain\Textures.o(.text+0xd0d):Textures.cpp: undefined refere
nce to `_imp__ilSaveImage@4'
build\rts\Map\SM3\terrain\Textures.o(.text+0xd26):Textures.cpp: undefined refere
nce to `_imp__ilDeleteImages@8'
collect2: ld returned 1 exit status
scons: *** [game\spring.exe] Error 1
scons: building terminated because of errors.