* [ECOS] linker error
@ 2001-08-09 10:02 Trenton D. Adams
2001-08-10 10:34 ` Jonathan Larmour
0 siblings, 1 reply; 2+ messages in thread
From: Trenton D. Adams @ 2001-08-09 10:02 UTC (permalink / raw)
To: 'eCos Disuss'
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] linker error
2001-08-09 10:02 [ECOS] linker error Trenton D. Adams
@ 2001-08-10 10:34 ` Jonathan Larmour
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2001-08-10 10:34 UTC (permalink / raw)
To: Trenton D. Adams; +Cc: 'eCos Disuss'
"Trenton D. Adams" wrote:
>
> 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
Looks right to me I'm afraid, and that's certainly what normally works
elsewhere. You can see whether it's working by doing an "arm-elf-nm" of the
.o file and seeing how if the name has changed to the C++ "mangled" name.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-08-10 10:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-09 10:02 [ECOS] linker error Trenton D. Adams
2001-08-10 10:34 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).