Forums

Full Version: Compiling in Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

This happens with both the SVN version and downloading the 05/08/08 source. Bullet compiled fine:

Here's the output:

Code:
[david@localhost vdrift]$ scons
scons: Reading SConscript files ...
Checking for C++ header file GL/gl.h... (cached) yes
Checking for C++ header file GL/glu.h... (cached) yes
Checking for C++ header file SDL/SDL.h... (cached) yes
Checking for C++ header file SDL/SDL_image.h... (cached) yes
Checking for C++ header file SDL/SDL_net.h... (cached) yes
Checking for C++ header file SDL/SDL_rotozoom.h... (cached) yes
Checking for C++ header file vorbis/vorbisfile.h... (cached) yes
Checking for C++ header file GL/glew.h... (cached) yes
This system is not configured for internationalized applications (no xgettext command). An english-only version will be built

Checking for C header file libintl.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: `build/vamos/body/Aerodynamic_Device.o' is up to date.
scons: `build/vamos/body/Brake.o' is up to date.
g++ -o build/vamos/body/Car.o -c -Wall -g3 -Iinclude -Ibullet-2.66/src src/vamos/body/Car.cc
In file included from include/settings.h:6,
                 from include/vamos/body/Car.h:38,
                 from src/vamos/body/Car.cc:23:
/usr/include/c++/3.3.6/bits/stl_pair.h: In instantiation of `std::pair<const>':
/usr/include/c++/3.3.6/bits/stl_tree.h:123:   instantiated from `std::_Rb_tree_node<std::pair<const> >'
/usr/include/c++/3.3.6/bits/stl_alloc.h:242:   instantiated from `static void std::__simple_alloc<_Tp>::deallocate(_Tp*, unsigned int) [with _Tp = std::_Rb_tree_node<std::pair<const> >, _Alloc = std::__default_alloc_template<true>]'
/usr/include/c++/3.3.6/bits/stl_tree.h:567:   instantiated from `void std::_Rb_tree_alloc_base<_Tp>::_M_put_node(std::_Rb_tree_node<_Val>*) [with _Tp = std::pair<const>, _Alloc = std::allocator<std::pair<const> >]'
/usr/include/c++/3.3.6/bits/stl_tree.h:580:   instantiated from `std::_Rb_tree_base<_Tp>::~_Rb_tree_base() [with _Tp = std::pair<const>, _Alloc = std::allocator<std::pair<const> >]'
/usr/include/c++/3.3.6/bits/stl_tree.h:748:   instantiated from `std::_Rb_tree<_Key>::~_Rb_tree() [with _Key = std::string, _Val = std::pair<const>, _KeyOfValue = std::_Select1st<std::pair<const> >, _Compare = std::less<std>, _Alloc = std::allocator<std::pair<const> >]'
include/logging.h:85:   instantiated from here
/usr/include/c++/3.3.6/bits/stl_pair.h:74: error: `std::pair<_T1>::second' has incomplete type
include/logging.h:50: error: forward declaration of `struct VDrift::LOGGER'
scons: *** [build/vamos/body/Car.o] Error 1
scons: building terminated because of errors.

This is on PCLinuxOS2007. All the libraries were installed from the repo.

Any ideas?

Thanks,

David [/code]
Looks like the logging.h file was using a forward-declared class as a member in an STL container and my STL/compiler combo compiled that but not yours. Anyway, I removed all of the forward declarations and put the class definitions in order -- try updating to R2122 and see if that fixed it.
Thanks, all sorted now.

I believe the initial compile problems may have been related to GCC 4.x because the project wouldn't build. I recompiled in GCC 3.3.6 and all was fine.
OK, glad you got it working. I compile with gcc 4.2.0 now, I think (I'm not at my dev comp right now), so I think that *should* have worked -- do you stil get errors with GCC 4.X?
With latest SVN release, yes, still problems. It appears to compile fine but doesn't link or whatever way round it goes. It errors out with undefined references to STDConfusedomefunction. I remember StreamBuffer or somesuch.

Compile with GCC3.3.6 and all is fine.

Dave
davidMC1982 Wrote:With latest SVN release, yes, still problems. It appears to compile fine but doesn't link or whatever way round it goes. It errors out with undefined references to STDConfusedomefunction. I remember StreamBuffer or somesuch.

Compile with GCC3.3.6 and all is fine.

Dave

you probably have a mixture of objects compiled with gcc 3 and 4 respectively. remove all the object files and try to recompile again with gcc 4 (the bullet library should also be compiled with the same gcc version). i have no problems compiling with gcc 4.3.1 on debian.

--alex--
You can run
Code:
scons --clean
to remove all of the temporary files.
hello,i am new with linux,and i want to experience this game .my os type is linux
(fedora9),i want to enjoy the lastest release of this game ,so i chose to compile from the source file.i download the source file ,
then tar -zxvf vdrift...(not full,just mean)
cd vdrift..(not full)
cd bullet-2.66
./configure
jam bulletcollision bulletmath
cd ..
scons

but, problem occured.
it shows:

scons: Reading SConscript files ...
Checking for C++ header file GL/gl.h... yes
Checking for C++ header file GL/glu.h... yes
Checking for C++ header file SDL/SDL.h... yes
Checking for C++ header file SDL/SDL_image.h... yes
Checking for C++ header file SDL/SDL_net.h... no
You do not have the SDL/SDL_net.h headers installed. Exiting.


can you help me?

thank you very much!
You need to install the sdl-net library. I'm not familiar with fedora but the package should be available through your distribution's package manager as SDL_net or something similar.