Open World Soccer Forum Index Open World Soccer
Community Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SVN Compilation Errors

 
Post new topic   Reply to topic    Open World Soccer Forum Index -> Programming
View previous topic :: View next topic  
Author Message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Sun Sep 21, 2008 2:44 am    Post subject: SVN Compilation Errors Reply with quote

Code:
Updated to revision 34.
[charles@localhost ows]$ make
g++    -c -o main.o main.cpp
g++    -c -o team.o team.cpp
g++    -c -o player.o player.cpp
g++    -c -o graphics.o graphics.cpp
g++    -c -o timer.o timer.cpp
g++    -c -o input.o input.cpp
input.cpp: In member function ‘int InputDevice::x()’:
input.cpp:82: error: call of overloaded ‘abs(int)’ is ambiguous
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:99: note: candidates are: double std::abs(double)
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:103: note:                 float std::abs(float)
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:107: note:                 long double std::abs(long double)
input.cpp: In member function ‘int InputDevice::y()’:
input.cpp:97: error: call of overloaded ‘abs(int)’ is ambiguous
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:99: note: candidates are: double std::abs(double)
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:103: note:                 float std::abs(float)
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/cmath:107: note:                 long double std::abs(long double)

_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Fri Oct 03, 2008 10:55 pm    Post subject: Re: SVN Compilation Errors Reply with quote

Fixed in revision 35, thanks for reporting! Smile
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Mon Oct 27, 2008 2:38 pm    Post subject: Reply with quote

Now r45 doesn't compile:

Code:
[charles@localhost ows]$ make
g++    -c -o main.o main.cpp
g++    -c -o match.o match.cpp
g++    -c -o team.o team.cpp
g++    -c -o player.o player.cpp
g++    -c -o graphics.o graphics.cpp
g++    -c -o timer.o timer.cpp
g++    -c -o input.o input.cpp
g++    -c -o common.o common.cpp
g++ -o ows main.o match.o team.o player.o graphics.o timer.o input.o common.o  -lGL -lGLU -lSDL -lSDL_image -lboost_program_options
main.o: In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x805): undefined reference to `Ball::Ball()'
main.o: In function `render_game(bool, int)':
main.cpp:(.text+0x16a9): undefined reference to `vcamera_y'
main.cpp:(.text+0x16c4): undefined reference to `vcamera_x'
main.cpp:(.text+0x1899): undefined reference to `Sprite::getZeta(int)'
main.cpp:(.text+0x18c8): undefined reference to `Sprite::getZeta(int)'
main.cpp:(.text+0x2b39): undefined reference to `vcamera_x'
main.cpp:(.text+0x2b99): undefined reference to `vcamera_y'
main.cpp:(.text+0x2d21): undefined reference to `vcamera_y'
main.cpp:(.text+0x2d3a): undefined reference to `vcamera_x'
main.o: In function `main':
main.cpp:(.text+0x4537): undefined reference to `vcamera_x'
main.cpp:(.text+0x457a): undefined reference to `vcamera_y'
main.cpp:(.text+0x4dd9): undefined reference to `Ball::load_image(char const*)'
main.cpp:(.text+0x4e44): undefined reference to `Image::Image(char const*, int, int)'
main.cpp:(.text+0x54b8): undefined reference to `Image::Image(char const*, int, int)'
main.cpp:(.text+0x55c5): undefined reference to `Camera::Camera(Ball*, float, float)'
main.cpp:(.text+0x5796): undefined reference to `Ball::update()'
main.cpp:(.text+0x57ae): undefined reference to `Ball::in_field_keep()'
main.cpp:(.text+0x57d0): undefined reference to `Ball::collision_net()'
main.cpp:(.text+0x583a): undefined reference to `Ball::collision_flagposts()'
main.cpp:(.text+0x5846): undefined reference to `Ball::collision_goal()'
main.cpp:(.text+0x58ba): undefined reference to `Ball::save(int)'
main.cpp:(.text+0x5954): undefined reference to `Camera::updatex(camera_follow, camera_speed, int, bool)'
main.cpp:(.text+0x5969): undefined reference to `vcamera_x'
main.cpp:(.text+0x599a): undefined reference to `Camera::updatey(camera_follow, camera_speed, int)'
main.cpp:(.text+0x59af): undefined reference to `vcamera_y'
match.o: In function `Match::render()':
match.cpp:(.text+0x8b): undefined reference to `Image::draw(int, int, int, int)'
match.o: In function `Match::Match()':
match.cpp:(.text+0xc8): undefined reference to `Image::Image(char const*, int, int)'
match.o: In function `Match::Match()':
match.cpp:(.text+0x134): undefined reference to `Image::Image(char const*, int, int)'
team.o: In function `Sprite::Sprite(Sprite const&)':
team.cpp:(.text._ZN6SpriteC2ERKS_[Sprite::Sprite(Sprite const&)]+0x3b): undefined reference to `vtable for Sprite'
player.o: In function `Player::draw_shadow(int)':
player.cpp:(.text+0x53f): undefined reference to `Image::draw(int, int, int, int)'
player.o: In function `Sprite::Sprite()':
player.cpp:(.text._ZN6SpriteC2Ev[Sprite::Sprite()]+0x19): undefined reference to `vtable for Sprite'
player.o:(.rodata._ZTI6Player[typeinfo for Player]+0x8): undefined reference to `typeinfo for Sprite'
collect2: ld returned 1 exit status
make: *** [ows] Error 1

_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Mon Oct 27, 2008 11:03 pm    Post subject: Reply with quote

Oops, sorry I forgot to update the Makefile! Fixed in r46!
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Tue Oct 28, 2008 5:05 pm    Post subject: Reply with quote

Yup, compiles fine again. Is there a roadmap for ows anywhere?
_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Tue Oct 28, 2008 7:44 pm    Post subject: Reply with quote

freegamer wrote:
Yup, compiles fine again. Is there a roadmap for ows anywhere?


Now I'm doing some code cleaning.
The next steps are:
- implementation of a match
- control/shots improvements
- simple menu
I hope to have all these ready by the year's end.
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Mon Dec 01, 2008 1:24 pm    Post subject: Reply with quote

I saw the start of the GUI in the previous revision - very nice start!

Now (r62) I'm getting another compilation error:

Code:
g++ -o game.o -c -I/usr/include/freetype2 game.cpp
In file included from game.cpp:22:
game.hpp:29:23: error: FTGL/ftgl.h: No such file or directory
In file included from game.cpp:22:
game.hpp:98: error: ISO C++ forbids declaration of 'FTTextureFont' with no type
game.hpp:98: error: expected ';' before '*' token
In file included from gtk/button.hpp:26,
                 from menu_main.hpp:27,
                 from game.cpp:24:
gtk/label.hpp:33: error: ISO C++ forbids declaration of 'FTTextureFont' with no type
gtk/label.hpp:33: error: expected ';' before '*' token
gtk/label.hpp:38: error: 'FTTextureFont' has not been declared
gtk/label.hpp:40: error: 'FTTextureFont' has not been declared
In file included from menu_main.hpp:27,
                 from game.cpp:24:
gtk/button.hpp:44: error: 'FTTextureFont' has not been declared
gtk/button.hpp:45: error: 'FTTextureFont' has not been declared
game.cpp: In constructor 'Game::Game(GameSettings, MatchSettings)':
game.cpp:99: error: 'font' was not declared in this scope
game.cpp:99: error: expected type-specifier before 'FTTextureFont'
game.cpp:99: error: expected `;' before 'FTTextureFont'
scons: *** [game.o] Error 1
scons: building terminated because of errors.


I have ftgl-devel installed (Fedora 9) so not too sure why that (ftgl.h) can't be found.
_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Thu Dec 04, 2008 12:40 am    Post subject: Reply with quote

freegamer wrote:

I have ftgl-devel installed (Fedora 9) so not too sure why that (ftgl.h) can't be found.

I'm using Ubuntu 8.10 for the development which has libftgl2 (which uses a different header).

Then I realized that many among major distributions (Debian Etch, Fedora 10, OpenSuse 10.3) still have ftgl.
Since the game is still in alpha stage, I think it's better to use ftgl2, which is also easier to use.

But since I wish the game to be able to run on all major distro, then I opened a branch of the game that can be compiled against ftgl.
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Thu Dec 04, 2008 1:43 am    Post subject: Reply with quote

I think you misunderstood.

The ftgl I have installed is version 2.1.2 (i.e. ftgl2) so the problem is not the ftgl version, it's finding it.
_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Thu Dec 04, 2008 8:26 pm    Post subject: Reply with quote

freegamer wrote:
I think you misunderstood.

The ftgl I have installed is version 2.1.2 (i.e. ftgl2) so the problem is not the ftgl version, it's finding it.


You're right, it's always ftgl2.

It's the new ftgl 2.1.3, which is available in Ubuntu 8.10, which has a new header, different from the 2.1.2 one. FTGL.h has been replaced by ftgl.h. There are also many other changes.

I tested the 'ftgl' branch on Fedora 9 & 10 and OpenSuse 10.3 and it works nice. I also have updated the building instructions for all distro.

Thanks! Smile
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Fri Dec 05, 2008 3:33 pm    Post subject: Reply with quote

I'm not sure a branch is required, just some Make-foo, only I don't know Makefiles.

I'm sure you can check for FTGL.h and, if not found, check for ftgl.h instead and use that.
_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Massimo32
Site Admin


Joined: 11 Nov 2007
Posts: 177
Location: Bolzano, Italy

PostPosted: Fri Dec 05, 2008 11:03 pm    Post subject: Reply with quote

freegamer wrote:
I'm not sure a branch is required, just some Make-foo, only I don't know Makefiles.

I'm sure you can check for FTGL.h and, if not found, check for ftgl.h instead and use that.


There are many other changes besides the name of the header, e.g.:
- inclusion of other headers:
Code:

2.1.2 - other headers include FTGL.h
2.1.3 - ftgl.h includes all others

- name of classes:
Code:

2.1.2 - FTGLTextureFont
2.1.3 - FTTextureFont

- method arguments:
Code:

2.1.2 - virtual void Render( const char* string );
2.1.3 - virtual FTPoint Render(const char* string, const int len = -1,
                               FTPoint position = FTPoint(),
                               FTPoint spacing = FTPoint(),
                               int renderMode = FTGL::RENDER_ALL)

- method behaviour
Code:

2.1.2 - 'Render' method require additional OpenGL commands to position the string
2.1.3 - 'Render' method can manage position and spacing
Back to top
View user's profile Send private message
freegamer



Joined: 14 Mar 2008
Posts: 21

PostPosted: Sat Dec 06, 2008 12:47 am    Post subject: Reply with quote

*groan* Why the hell would a x.y.Z release, a "bugfix" release by any other name, include API changes?

That's just ill.
_________________
Free Gamer - open source games blog
FreeGameDev community
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open World Soccer Forum Index -> Programming All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Get Open World Soccer at SourceForge.net. Fast, secure and Free Open Source software downloads