LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-13-2008, 11:42 AM   #1
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Rep: Reputation: 32
compiling code resulting in: 'unrecognized command line "-fstart-group"'


Hi,

I'm running gcc version 3.4.3 on a Red Hat linux EL4.

I enter the follwing command (or actually wrote a Makefile):

Code:
/home/builder/montavista/cge/devkit/x86/pentium4/bin/pentium4-gcc -o -Wall -DLINUX_LIB  polyposix.cxx -o polyposix.o -I/home/insi/platform/element-org/include/ -I/home/insi/platform/element-org/include/linux -I/home/insi/platform/element-org/lib/linux-mvcge401-pl1337-x86 -I/home/insi/platform/element-org/ref_platforms/kontron/callouts/lib/linux-mvcge401-pl1337-x86 -I/home/insi/platform/poly7.1/include -Wl, --start-group -lelem_core_api -lelem_amf_api -llinx -lelem_ais_api -element_callouts -Wl, --end-group -lstdc++ -lrt -lnsl -lexpat
cc1plus: error: unrecognized command line option "-fstart-group"
cc1plus: error: unrecognized command line option "-fend-group"
I can't find the error or the meaning of the error. Anybody have a clue?

Thanks
Indy
 
Old 05-13-2008, 01:58 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
It states that the --start-group and --end-group are treated as gcc options (hence the prefix -f in the error message) but they are not recognized, since they are linker options. For this reason you use the -Wl, option to specify they have to be passed to the linker.

The problem here is simply the syntax: do not put a space between -Wl, and --start-group. It should be:
Code:
-Wl,--start-group .......... -Wl,--end-group
Strip out extra spaces and the trick is done.
 
Old 05-14-2008, 01:28 AM   #3
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
Thanks Colucix.

That was just it. Cheers.

Indy
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cc1: error: unrecognized command line option "-mapcs-32" vengat Linux - Hardware 0 04-29-2008 02:18 AM
unrecognized command line option "-mapcs-32" vengat Linux - Hardware 1 04-26-2008 12:07 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
GD not loaded though compiled, resulting in "Call to undefined function" czamora Linux - Software 12 08-01-2006 11:10 AM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 11:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration