This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: [ECOS] SWtools g++ usage question - guess I found it.


Title: RE: [ECOS] SWtools g++ usage question - guess I found it.

Rudely replying to my own note:

"If I change main's name from <name>.c to <name>.cpp with no changes to the other files) and recompile that object with <target>-g++, the link fails with an unresolved label "__main()".

...
I suppose this is must be a FAQ, but I would be grateful for any explanation."

If I wrap my original code with:

external "C" {
<my code>
}

it links fine. A C++ FAQ, I'm sure.

Thanks anyway - comments still very welcome.

  John Mills, Sr. Software Engineer
  TGA Technologies, Inc.
  100 Pinnacle Way, Suite 140
  e-mail: jmills@tga.com
  Norcross, GA 30071-3633
  Phone: 770-421-2100 ext.124 (voice)
         770-449-7740 (FAX)

-----Original Message-----
From: John Mills [mailto:Jmills@TGA.com]
Sent: Tuesday, June 15, 1999 11:00 AM
To: 'eCos Discussion'
Cc: John Mills
Subject: [ECOS] SWtools g++ usage question



Greetings - I'm new to cross-platform 'gcc' and to C++, so this is probably
a simple question: sorry it is more a 'g++' than an eCos question. Sorry
also if this is excessive detail.

I have a simple program - one "real" object and the three or so supporting
files to target an embedded processor (SH-2). It compiles and links
perfectly
when compiling with <target>-gcc.

I'm working with 'ecosSWtools-990319', built under RH6.0. It is not a full
eCos tools build (I don't have 'sh-hms-gdb'), but the essentials seem to
have built: I compiled my 'C' main, assembled all, and linked an executable,
then exported source and executable to a WinNT box where I downloaded and
debugged -- stepping through source while running in off-board hardware
[EDK7045F] -- under Hitachi's IDE (which may or may not have used 'gdb' to
debug).

TIA for any suggestions. I'll be happy to provide more details to anyone.

Regards -

  John Mills, Sr. Software Engineer
  TGA Technologies, Inc.
  100 Pinnacle Way, Suite 140
  e-mail: jmills@tga.com
  Norcross, GA 30071-3633
  Phone: 770-421-2100 ext.124 (voice)
         770-449-7740 (FAX)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]