Jump to content

Undefined reference to 'main' :o


Recommended Posts

Dear community,

 

I'm actually having some trouble compiling my gamecore.

I changed nothing important just added some features (but even without I'm now receiving these errors!) and I get these at compiling on FreeBSD:

linking ../game_r126_dev_PET....
linking ../test
/usr/lib/crt1.o: In function `_start1':
crt1_c.c:(.text+0xa6): undefined reference to `main'
/usr/lib/crt1.o: In function `_start1':
crt1_c.c:(.text+0xa6): undefined reference to `main'
OBJDIR/desc.o: In function `DESC::ProcessOutput()':
/eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written'
/eos_src/game/src/desc.cpp:408: undefined reference to `total_bytes_written'
/eos_src/game/src/desc.cpp:409: undefined reference to `current_bytes_written'
/eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written'
OBJDIR/desc.o: In function `DESC::ProcessOutput()':
/eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written'
/eos_src/game/src/desc.cpp:408: undefined reference to `total_bytes_written'
/eos_src/game/src/desc.cpp:409: undefined reference to `current_bytes_written'
/eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written'
OBJDIR/event.o: In function `event_process(int)':
/eos_src/game/src/event.cpp:135: undefined reference to `ContinueOnFatalError()'
OBJDIR/event.o: In function `event_process(int)':
/eos_src/game/src/event.cpp:135: undefined reference to `ContinueOnFatalError()'
OBJDIR/input.o: In function `CInputProcessor::Pong(DESC*)':
/eos_src/game/src/input.cpp:187: undefined reference to `Metin2Server_IsInvalid()'
/eos_src/game/src/input.cpp:190: undefined reference to `g_bShutdown'
OBJDIR/input.o: In function `CInputProcessor::Pong(DESC*)':
/eos_src/game/src/input.cpp:187: undefined reference to `Metin2Server_IsInvalid()'
/eos_src/game/src/input.cpp:190: undefined reference OBJDIR/input_auth.o: In function `CInputAuth::LoginOpenID(DESC*, char const*)':
/eos_src/game/src/input_auth.cpp:246: undefined reference to `Metin2Server_IsInvalid()'
OBJDIR/input_auth.o: In function `CInputAuth::Login(DESC*, char const*)':
/eos_src/game/src/input_auth.cpp:115: undefined reference to `Metin2Server_IsInvalid()'
to `g_bShutdown'
OBJDIR/input_auth.o: In function `CInputAuth::LoginOpenID(DESC*, char const*)':
/eos_src/game/src/input_auth.cpp:246: undefined reference to `Metin2Server_IsInvalid()'
OBJDIR/input_auth.o: In function `CInputAuth::Login(DESC*, char const*)':
/eos_src/game/src/input_auth.cpp:115: undefined reference to `Metin2Server_IsInvalid()'
OBJDIR/input_db.o: In function `CInputDB::P2P(char const*)':
/eos_src/game/src/input_db.cpp:1356: undefined reference to `main_fdw'
OBJDIR/input_db.o: In function `CInputDB::P2P(char const*)':
/eos_src/game/src/input_db.cpp:1356: undefined reference to `main_fdw'
OBJDIR/marriage.o: In function `marriage::TMarriage::Logout(unsigned int)':
/eos_src/game/src/marriage.cpp:299: undefined reference to `g_bShutdown'
/eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown'
/eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown'
OBJDIR/marriage.o: In function `marriage::TMarriage::Logout(unsigned int)':
/eos_src/game/src/marriage.cpp:299: undefined reference to `g_bShutdown'
/eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown'
/eos_src/game/src/marriage.cpp:316: undefined reference to `g_bShutdown'
gmake: *** [../test] Error 1
gmake: *** Waiting for unfinished jobs....
gmake: *** [../game_r126_dev_PET] Error 1

I returned my changes and I did them again (step by step always checking if I really did it right!).

 

On windows I can compile without any problems.

 

Someone can help me out?

 

Regards

Link to comment
Share on other sites

those are declared in main.cpp :

/eos_src/game/src/desc.cpp:406: undefined reference to `max_bytes_written'
/eos_src/game/src/desc.cpp:408: undefined reference to `total_bytes_written'
/eos_src/game/src/desc.cpp:409: undefined reference to `current_bytes_written'

and

Metin2Server_IsInvalid()

is a good for nothing function (exept if you are using it for per-complied game core)

 

Link to comment
Share on other sites

Yeah, I already thought about that and I know that. Since there's no compiling error in visual studio (windows) everything's fine with the cpp's. I also checked the Makefile if there's the error but for me it looks okay (compared with some others but nothing important is different just the version management I mean the thing with rXXX). The main.cpp is compiling (I mean I just get the error at the end at linking things and I can see that it's compiled).

 

Regards

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.