Strange linker errors

edited September 2012 in Help request
Alright, I've tried everything I can think of aside from making a new project, but I keep getting two weird linker errors:

----------Build Started--------
/bin/sh -c '"make"  -j 4 -f "SDP00_wsp.mk"none'
----------Building project:[ Game - Debug ]----------
make[1]: Entering directory `/home/chaz/Projects/Sweet Dreams Project/SDP00/build'
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/OrxScroll.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_OrxScroll.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/player_character.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_player_character.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/weapon.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_weapon.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/enemy.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_enemy.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/enemy.cpp: In member function ‘virtual orxBOOL Enemy::OnCollide(ScrollObject*, const orxCHAR*, const orxVECTOR&, const orxVECTOR&)’:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/enemy.cpp:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/weapon.cpp: In member function ‘virtual orxBOOL Weapon::OnCollide(ScrollObject*, const orxCHAR*, const orxVECTOR&, const orxVECTOR&)’:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/weapon.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
In file included from /home/chaz/Projects/Sweet Dreams Project/SDP00/src/player_character.cpp:1:0:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/player_character.h:28:3: warning: anonymous type with no linkage used to declare variable ‘<anonymous class> player_character’ with linkage [enabled by default]
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/bomb.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_bomb.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
g++ -c  "/home/chaz/Projects/Sweet Dreams Project/SDP00/src/skill.cpp" -pedantic -Wall  -g -D__orxDEBUG__  -o ./Debug/src_skill.o "-I." "-I/usr/local/include" "-I/usr/local/include/orx" 
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/bomb.cpp: In member function ‘virtual orxBOOL Bomb::OnCollide(ScrollObject*, const orxCHAR*, const orxVECTOR&, const orxVECTOR&)’:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/bomb.cpp:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/skill.cpp: In member function ‘virtual orxBOOL Skill::OnCollide(ScrollObject*, const orxCHAR*, const orxVECTOR&, const orxVECTOR&)’:
/home/chaz/Projects/Sweet Dreams Project/SDP00/src/skill.cpp:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
g++ -o ../bin/Gamed ./Debug/src_OrxScroll.o ./Debug/src_player_character.o ./Debug/src_weapon.o ./Debug/src_enemy.o ./Debug/src_bomb.o ./Debug/src_skill.o  "-L." "-L/usr/lib" "-L/usr/local/lib"  -lorxd  
./Debug/src_player_character.o: In function `orxMath_Floor':
/usr/local/include/orx/math/orxMath.h:460: multiple definition of `game_engine'
./Debug/src_OrxScroll.o:/usr/local/include/orx/math/orxMath.h:471: first defined here
./Debug/src_weapon.o: In function `orxMath_Floor':
/usr/local/include/orx/math/orxMath.h:460: multiple definition of `game_engine'
./Debug/src_OrxScroll.o:/usr/local/include/orx/math/orxMath.h:471: first defined here
./Debug/src_enemy.o: In function `orxMath_Floor':
/usr/local/include/orx/math/orxMath.h:460: multiple definition of `game_engine'
./Debug/src_OrxScroll.o:/usr/local/include/orx/math/orxMath.h:471: first defined here
./Debug/src_bomb.o: In function `orxMath_Floor':
/usr/local/include/orx/math/orxMath.h:460: multiple definition of `game_engine'
./Debug/src_OrxScroll.o:/usr/local/include/orx/math/orxMath.h:471: first defined here
./Debug/src_skill.o: In function `orxMath_Floor':
/usr/local/include/orx/math/orxMath.h:460: multiple definition of `game_engine'
./Debug/src_OrxScroll.o:/usr/local/include/orx/math/orxMath.h:471: first defined here
./Debug/src_player_character.o: In function `._55::._55()':
player_character.cpp:(.text+0x1da7): undefined reference to `vtable for ._55'
./Debug/src_player_character.o: In function `._55::~._55()':
player_character.cpp:(.text+0x1dfd): undefined reference to `vtable for ._55'
collect2: ld returned 1 exit status
make[1]: *** [../bin/Gamed] Error 1
make[1]: Leaving directory `/home/chaz/Projects/Sweet Dreams Project/SDP00/build'
make: *** [All] Error 2
----------Build Ended----------
13 errors, 7 warnings
First of all, I have no clue what ._55::._55() is.

Second of all, I have no clue why my main game engine class says it's already been defined in orxmath.h.

Third of all, I can't easily upload my project at the moment. I'll try later, but I can paste code segments and answer questions if you have them. But I just can't figure out what's wrong at all, and I'm hoping one of you has seen a similar problem out there and can at least give me an idea of what to try next. Thanks.

Comments

  • edited September 2012
    I'm afraid I can't be of much help with your project files.

    The error message are getting rather non-sensical, so without the ability of fiddling directly with your code/settings, it's not going to really be feasible.

    Good luck!
  • edited September 2012
    Yeah... not sure what I'm gonna do. Uploading it somewhere is proving to be a pain behind the school's proxy/filter combo. I might just have to wait until later.
  • edited September 2012
    Even for sending it by email?
  • edited September 2012
    sending it by email would be impossible unless I sent it file-by-file. No zips.
  • edited September 2012
    What about a tar, no compression, just concatenation?
  • edited September 2012
    Nah, has to be text or openoffice/word documents. >.<
  • edited September 2012
    Well project files are text/xml and all your sources are also text, so a tar should also be a text file.

    And I presume you can't save on a usb drive or a floppy either?
    Well then good luck! ;)
  • edited September 2012
    I can save on a usb drive. Not sure how that helps though <_<
    Also, I misread. Didn't know tar could do the whole concatenation thing. Gotta check that out.

    I just fixed the vtable errors. Somehow, my include guards ended up having the exact same name as the class. Obviously, strange things happened. Still having the same "first defined here" problem with orxmath.
  • edited September 2012
    Strange. Just fixed it by removing the name of the class after the closing bracket. Well, that was an adventure. Now I'm getting 5000+ warnings because I switched to C++0x and it's complaining about some of the things you've done in here. Hopefully these warnings won't cause problems...
  • edited September 2012
    Glad you got it mostly sorted then!

    As for the USB drive you could then have it sent from any wifi hotspot or asked a friend to do it for you.
    Feels like it was easier to transfer files back in the days via BBCs, listening to you! ;)

    Can I get a list of the warnings you get? Also, there are no compiler fully supporting C++11 yet, it's only 1 year old so I'd wait a bit longer if I were you.
    After all, some features from C99 are still not implemented in VC. ;)
  • edited September 2012
    Also, forgot to tell you I enabled -Wall. I like my programs (at least my sections of the code) to be both warning and error-free if at all possible.

    EDIT: There are way too many. More than I thought. There are 5000+ warnings. How about I just email it to you? ^_^:;
  • edited September 2012
    Sounds good.

    Also some warnings are about things that could be dangerous in some situations and just to make sure you're aware of it, so *all* warnings are not always good, So if you know that your code is safe in your situation, it just adds noise.
Sign In or Register to comment.