Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-14-2014, 05:11 PM
CoryWalker
Fire Beetle
 
Join Date: Oct 2014
Posts: 23
Default Linking against libcommon.a fails

I am able to create libcommon.a without any linker issues at all. However, when I attempt to further link against libcommon.a and create an executable - such as shared_memory - I get the following 4 linker errors:

--
g++49 -o test -nodefaultlibs -L/usr/local/lib/gcc49 main.o /usr/local/build/everquest/common/libcommon.a /usr/lib/libthr.so /usr/local/lib/mysql/libmysqlclient.so -lgcc_s -lstdc++ -lc

/usr/local/build/everquest/common/libcommon.a: undefined reference to `SPDAT_RECORDS'

/usr/local/build/everquest/common/libcommon.a: undefined reference to `CatchSignal(int)'

/usr/local/build/everquest/common/libcommon.a: undefined reference to `timeout_manager'

/usr/local/build/everquest/common/libcommon.a: undefined reference to `spells'
collect2: error: ld returned 1 exit status
--

I know the exact cause of the errors. However, I do not know what the safe way of fixing the issue is. All of these errors are caused by declaring external variables in a header file but are not defined in the application that uses them - at the very least shared_memory is not defining them.

The following extern variables and functions are in question:

spdat.h, line 754:
extern int32 SPDAT_RECORDS;

eqemu_error.cpp, line 32:
void CatchSignal(int sig_num);

timeoutmgr.h, line 64:
extern TimeoutManager timeout_manager;

spdat.h, line 753:
extern const SPDat_Spell_Struct* spells;

What is the best way to resolve this issue? Are these globals still used? Should I manually defined them? Should I just delete them and recompile/relink?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:31 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3