This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
linker error
- To: "'eCos Disuss'" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] linker error
- From: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Date: Thu, 9 Aug 2001 11:01:09 -0600
I'm attempting to compile my program. I'm getting the error below. For
some reason the linker is not finding my function. If I switch it to a
'c' extension it works fine, but cpp will not work. Is there any way to
make it work with a cpp extension? I have the reverse happening on my
windows side. I need these functions on both platforms.
I tried doing the following, but it gave me a compiler error on the
windows side. I was sure that extern "C" was what I was supposed to do.
extern "C" function prototype
This may seem like a dumb question, but I'm not very up to speed on
different linkages since I've never had to worry about it because I
always do windows development in MFC. Even my MSDN documentation says
that extern "C" is supposed to work. It doesn't though.
Hope fully there's something I can do to fix it on the gcc side of
things.
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c AcquireThread.c -Ttarget.ld
-nostdlib -o AcquireThread.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c CommandThread.c -Ttarget.ld
-nostdlib -o CommandThread.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c StatusSignalThread.c
-Ttarget.ld -nostdlib -o StatusSignalThread.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c TransmitThread.c
-Ttarget.ld -nostdlib -o TransmitThread.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c NetCode.c -Ttarget.ld
-nostdlib -o NetCode.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/in
clude -ffunction-sections -fdata-sections -c
../../WindowsDevelopment/Monitor/netproto.cpp \
-Ttarget.ld -nostdlib -o netproto.o
arm-elf-gcc -O0 -mcpu=arm7tdmi -D__EDB7211 -D__ECOS
-nostartfiles -L/c/MyDocuments/eCosBuilds/RAMSupport_insta
ll/lib -Wl,--gc-sections -g -Wall
-I/c/MyDocuments/eCosBuilds/RAMSupport_install/include
-ffunction-sections -fdata-sect
ions AcquireThread.o CommandThread.o \
StatusSignalThread.o TransmitThread.o NetCode.o netproto.o \
RigSystem.c -Ttarget.ld -nostdlib -o RigSystem.exe
CommandThread.o: In function `CommandThread':
/c/MyDocuments/eCosDevelopment/RigSystem/CommandThread.c:113: undefined
reference to `ToTRigCommand'
/c/MyDocuments/eCosDevelopment/RigSystem/CommandThread.c:167: undefined
reference to `ToTRigCommand'
collect2: ld returned 1 exit status
make: *** [rigsystem] Error 1
Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1
Phone: 403 640 9494 ext-208
Fax: 403 640 9599
http://www.extremeeng.com