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 Thanks Indy |
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 |
Thanks Colucix.
That was just it. Cheers. Indy |
All times are GMT -5. The time now is 11:50 AM. |