Forums

Full Version: Problem compiling vdrift-trackeditor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do I run vdrift-trackeditor?
Do I have to compile?
If I run scons in the vdrift-trackeditor directory I get

Code:
norv@sid5600:~/vdrift-trackeditor$ 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

scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.
File "/home/norv/vdrift-trackeditor/src/SConscript", line 32, in <module>
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/main.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-02\" -DVERSION=\"2008-10-02\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/main.cpp
src/main.cpp:955: error: ‘<anonymous>’ has incomplete type
src/main.cpp:955: error: invalid use of ‘GLvoid’
src/main.cpp:1058: error: ‘<anonymous>’ has incomplete type
src/main.cpp:1058: error: invalid use of ‘GLvoid’
src/main.cpp: In function ‘int main(int, char**)’:
src/main.cpp:955: error: too few arguments to function ‘int initGL(<type>)’
src/main.cpp:1808: error: at this point in file
src/main.cpp:1058: error: too few arguments to function ‘int drawGLScene(<type>)’
src/main.cpp:1894: error: at this point in file
scons: *** [build/main.o] Error 1
scons: building terminated because of errors.
norv@sid5600:~/vdrift-trackeditor$
You are compiling correctly, but there was some old code that was causing errors with newer compilers. I checked in some changes just now to fix it -- try updating your SVN copy of VDrift-tracked to rev 69.
Thanks Joe, I got #69, got a bit further with the compile... but not quite there yet..
Code:
norv@sid5600:~$ svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor
U    vdrift-trackeditor/src/main.cpp
Checked out revision 69.

norv@sid5600:~$
norv@sid5600:~$ cd vdrift-trackeditor
norv@sid5600:~/vdrift-trackeditor$ 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

scons: warning: The env.Copy() method is deprecated; use the env.Clone() method instead.
File "/home/norv/vdrift-trackeditor/src/SConscript", line 32, in <module>
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/main.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/main.cpp
g++ -o build/camera.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/camera.cpp
g++ -o build/font.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/font.cpp
g++ -o build/keyman.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/keyman.cpp
g++ -o build/messageq.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/messageq.cpp
g++ -o build/model.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/model.cpp
g++ -o build/mouse.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/mouse.cpp
g++ -o build/objects.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/objects.cpp
g++ -o build/quat.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/quat.cpp
g++ -o build/settings.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/settings.cpp
src/settings.cpp:82:67: warning: "/*" within comment
g++ -o build/track.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/track.cpp
g++ -o build/utility.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/utility.cpp
g++ -o build/configfile.o -c -Wall -Wno-non-virtual-dtor -g -O2 -DVERSION=\"2008-10-03\" -DVERSION=\"2008-10-03\" -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/SDL src/configfile.cpp
src/configfile.cpp: In member function ‘void CONFIGVARIABLE::Set(std::string)’:
src/configfile.cpp:316: error: ‘atoi’ was not declared in this scope
src/configfile.cpp:317: error: ‘atof’ was not declared in this scope
scons: *** [build/configfile.o] Error 1
scons: building terminated because of errors.
norv@sid5600:~/vdrift-trackeditor$
Alright... getting closer... try rev 70.
Yep, that compliles. When I run the vdrift file in the build directory it complains it can't find data/settings/Vdrift.config, but that file is there.. and if I copy vdrift executable to the main directory it segfaults. But getting closer!
Code:
norv@sid5600:~/vdrift-trackeditor/build$ ./vdrift
CONFIGFILE.Load: Couldn't find file:  data/settings/VDrift.config
CONFIGFILE.Load: Couldn't find file:  data/settings/VDrift.config
CONFIGFILE::GetParam():  main.data_dir not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  main.version not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.width not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.height not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.depth not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.fullscreen not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.tree_detail not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.terrain_detail not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.show_hud not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.show_fps not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.mph not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.texture_size not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  display.view_distance not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  game.selected_car not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  game.car_paint not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  game.camera_mode not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  game.game_mode not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  game.track not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  network.host_game not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  network.server_ip not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  network.server_port not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  sound.volume not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  mouse.enabled not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  mouse.xsens not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  mouse.ydead not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  mouse.ysens not found in data/settings/VDrift.config
CONFIGFILE::GetParam():  control.autoclutch not found in data/settings/VDrift.config
Run with -verbose for troubleshooting.
Video mode set failed: Couldn't open data/textures/medium/gui/newfontt3.png
norv@sid5600:~/vdrift-trackeditor/build$
Try running build/vdrift from the VDrift-tracked folder instead of running ./vdrift from the build folder.
Yep, that works, the track editor opens. Now to work out how to use it!
Thanks for the help Joe.
I was able to export my track (rough draft!) from Blender into vdrift-trackeditor and trace the track.
When I run the joepack command I get
Code:
norv@sid5600:~/vdrift-trackeditor$ cd data/tracks/byron/objects
norv@sid5600:~/vdrift-trackeditor/data/tracks/byron/objects$ joepack/joepack -c objects.jpk *.joe
bash: joepack/joepack: No such file or directory
norv@sid5600:~/vdrift-trackeditor/data/tracks/byron/objects$
What should I do to get it to work?
First, build the joepack tool with
Code:
cd ~/vdrift-trackeditor/joepack
scons
then you can do
Code:
cd ~/vdrift-trackeditor/data/tracks/byron/objects
~/vdrift-trackeditor/joepack -c objects.jpk *.joe
I've just updated the wiki instructions to be correct and also fixed a few other problems with them.
Thanx Joe for the update. I get a compile error with joepack:
Code:
norv@sid5600:~/vdrift-trackeditor/joepack$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/main.o -c -Iinclude src/main.cpp
src/main.cpp: In function 'int main(int, char**)':
src/main.cpp:237: error: 'strcpy' was not declared in this scope
scons: *** [src/main.o] Error 1
scons: building terminated because of errors.
norv@sid5600:~/vdrift-trackeditor/joepack$
Alright, try rev 71 of the track editor.
Yep, joepack compiles now.
When I moved the new track into main vdrift folder and started vdrift I got

Code:
EXCEPTION: src/textures.cpp, line 489:  Error loading texture file: tracks/byron/trackshot.png (/home/norv/vdrift/data/tracks/byron/trackshot.png)

So I made a dummy trackshot.png and now the game loads. But when I choose my track it complains about not finding textures..

Code:
EXCEPTION: src/textures.cpp, line 489:  Error loading texture file: /home/norv/vdrift/data/tracks/byron/objects/sky_photo6.jpg (/home/norv/vdrift/data//home/norv/vdrift/data/tracks/byron/objects/sky_photo6.jpg)

Not sure where I went wrong. Somehow I have failed to export and pack textures. I'll try again. Thanks for all the help!
I got to "drive" the track - but looks like my Blender texture settings are all up the creek - back to the drawing board!
norv Wrote:Not sure where I went wrong. Somehow I have failed to export and pack textures. I'll try again. Thanks for all the help!

Just in case you haven't figured it out, all you need to do is export the textures to png and put them in the data/tracks/byron/objects folder; they don't get put in the joepack file.
Pages: 1 2