Help !! With the error Posted..

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2007
Posts: 35
Reputation: RohitSahni is an unknown quantity at this point 
Solved Threads: 0
RohitSahni RohitSahni is offline Offline
Light Poster

Help !! With the error Posted..

 
0
  #1
Aug 1st, 2007
Hi All,
Please Help me out with this below mentioned error.

  1. librohit.a: undefined reference to `MODEL_NAME'
  2. librohit.a: undefined reference to `FT_MODEL'
  3. librohit.a: undefined reference to `STOCK_MODEL'
  4. librohit.a: undefined reference to `FUTURE_MODEL'
  5. librohit.a: undefined reference to `COArgs::COArgs()'
  6. librohit.a: undefined reference to `std::strstreambuf::freeze(int)'
  7. librohit.a: undefined reference to `RWMutex::wLock()'
  8. librohit.a: undefined reference to `OUTSTRIKE_PARAMETERS'
  9. librohit.a: undefined reference to `sec_login_sql_client'
  10. librohit.a: undefined reference to `sec_login_ctor'
  11. librohit.a: undefined reference to `RWMutex::wUnlock()'
  12. librohit.a: undefined reference to `RWMutex::rLock()'
  13. librohit.a: undefined reference to `RWMutex::rUnlock()'
  14. librohit.a: undefined reference to `String::String(char)'
  15. librohit.a: undefined reference to `String::hashval() const'
  16. collect2: ld returned 1 exit status
  17.  

Thanks
Rohit
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 35
Reputation: RohitSahni is an unknown quantity at this point 
Solved Threads: 0
RohitSahni RohitSahni is offline Offline
Light Poster

Re: Help !! With the error Posted..

 
1
  #2
Aug 1st, 2007
I am trying to build exe bbut getting the following above said error..
I am tring to build below mention code.

  1. #include <iostream>
  2. #include <fstream.h>
  3. #include <stdlib.h>
  4.  
  5. #include "RohitSahni/String.h"
  6.  
  7. using namespace std;
  8. int main(int argc, char **argv)
  9. {
  10. String testString("Hellow");
  11. cout << "*********"<<testString.c_str();
  12.  
  13.  
  14.  
  15. }


In the above code i have defined my own String claa inherited from std::string.

Plz Help

Thanks
Rohit
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,485
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1478
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Help !! With the error Posted..

 
0
  #3
Aug 1st, 2007
line 2: unless you are using a very old compiler such as the original Turbo c++ you should be using header files without the .h extension because there have been some changes.

You should have named your derived string something other than String.h because that is already the name of standard C string functions. Its not good to duplicate file names like that because it will eventually become confusing.

My guess about your specific problem is that you did not include one or more required libraries in the project. Did you include the implementation code for your derived class ?
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC