GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Jul-2009, 17:06
messybat messybat is offline
New Member
 
Join Date: Jul 2009
Posts: 1
messybat is on a distinguished road
Exclamation

Linker Error in Dev C++


I am writing a program in Dev c++, and I am trying to include several ROOT libraries.

When my code attempts to compile and run I get error such as:

Code:
E:\DOCUME~1\Lab\LOCALS~1\Temp\ccQpbaaa.o(.text+0x155) In function `Z11calorimeterii': [Linker error] undefined reference to `TStyle::SetPalette(int, int*)' [Linker error] undefined reference to `_imp__gStyle'

An example of some of the libraries I am trying to include:

TTree.h
TStyle.h... etc

they are located in E:\root\libraries and I have made sure to include that folder in the library section of the compiler options window under tools.

Any ideas suggestions on how to link or resolve this error?

Hi I'm new to this forum and computer programming in general, this is my first post (Just a warning of potentially offensive mistakes I might make)
  #2  
Old 17-Jul-2009, 09:31
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Linker Error in Dev C++


Quote:
Originally Posted by messybat
I am writing a program in Dev c++, and I am trying to include several ROOT libraries.

When my code attempts to compile and run I get error such as:.
.
.

Apparently the compiler found TStyle.h; otherwise it never would have reached the linker stage. The header contains the class definition, including function prototypes. It apparently does not contain the actual implementation of the class methods. (This is normal.)


Now, here's the question: Were you given a library file (probably named "something.a").? If you were, then note that this must have been compiled with system libraries consistent with your particular vintage compiler and libraries.

Or were you given source files (probably with names like "TStyle.cpp" or "Tstyle.cxx" and other .cpp or .cxx files)?

If TStyle is a derived class, then you will need source for the base class(es) also.

Bottom line: You will have to put the library or the source files in your project in order to use these classes in your application. If you weren't given source files, then you will have to get them from wherever you got the header files.


Regards,

Dave
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linker error problem using GNU ARM GCC compiler karthickd C Programming Language 1 26-Dec-2008 00:52
Linker Error: Undefined Symbol hadrien C Programming Language 3 29-Nov-2008 04:52
Linker Error athika_32 C Programming Language 6 03-Dec-2007 08:38
BCC45 Linker Question; Need Help poden C++ Forum 9 13-Nov-2006 13:35
linker problem svenveer C Programming Language 6 17-Oct-2005 14:38

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 08:53.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.