The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to compile from source code? wrapster UNIX and Linux Applications 1 05-27-2008 01:03 PM
C compile error kuampang High Level Programming 3 11-29-2006 08:30 PM
How do I compile source undfer Suse Linux? Mark Ward Linux 3 05-26-2006 10:28 AM
RS/6000 gcc compile large file error q30 AIX 3 07-20-2004 12:16 AM
compile rpm-4.0 source eddie High Level Programming 2 08-28-2001 02:59 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-05-2002
Registered User
 

Join Date: Mar 2002
Location: CR
Posts: 3
error trying to compile a c++ source file

i tried to compile a c++ file using the g++ command:

g++ <filename>.cpp -out <output_file>

and i received the following error message:

ld.so.1: gcc: fatal: relocation error: file gcc: symbol bindtextdomain: referenced symbol not found
Killed

is it that i am using incorrectly the command?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-05-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
What kind of system is this?
I have two comments: You need a space between -o and the binay file, like this: -o ut
The file will then be called ut.
Also, cpp is an unusual extension, most often c++ program either have .c++ or .C as extension, whereas C files have .c.

Try to create the file tst.C:
#include <iostream.h>
main
{
cout << "Hello\n";
}

Then compile:

$ g++ tst.C -o tst

Then run
$ ./tst

If there is still no go, you may have a non-standard system.

BTW: CPP is the C PreProcessor, shows you the code after macro expansions,etc.

Atle
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0