[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Building an application on RedHat 7.2
- From: "Neeraj Garg, Noida" <ngarg noida hcltech com>
- To: redhat-list redhat com
- Subject: Building an application on RedHat 7.2
- Date: Sat May 31 12:26:10 2003
Hello everybody,
I am trying to port an application on linux. In the building process, i want
to use two step process:
g++ -nostdinc -MD -O2 -funroll-loops -fforce-addr -Wall -W -Wpointer-arith
-Wno-unused -I/usr/lib/gcc-lib/i386-redhat-linux/2.96/include
-I/usr/include -W -Wmissing-prototypes -D__GCC32__ -c <src_file> -o
<object_file>
and then ld -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/ -L/usr/lib -lpthread
-lstdc++ -lg++ -lgcc -lm -lc <all .o files> -o <a.out>
------------------------------
To remove the warning "ld: warning: cannot find entry symbol _start;
defaulting to 08048f58", i am adding following in ld command line:
/usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o /usr/lib/crtn.o
---------------------------
Now a.out is successfully built. But now if am trying to execute it, it
gives me following error:
"bash: ../a.out: No such file or directory"
------------------------------------
Can anybody please tell me if i am supposed to include other linux standard
libraries to execute an a.out problem which is built using g++ and ld?
-neeraj
----------------------------------------------------------------------
Neeraj Kumar Garg
Member Technical Staff
HCL Technologies Ltd.
A-5, Sector 24 Work: 91-11-91-2411502 Ext 2560
Noida UP - 201301 Fax: 91-11-91-2440155
India
----------------------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]