* C++ & GCC / nm / symbols with trailing characters / linker errors
@ 2001-08-31 4:58 Karl Esau
2001-09-04 19:24 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Karl Esau @ 2001-08-31 4:58 UTC (permalink / raw)
To: GCC help
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
Hi,
I need to port a QT-application from an older development machine
to a production server.
the application consists of several C++ classes for the GUI control
and a set of interface classes that use embedded SQL-procedures,
generated by the oracle (8.1.6) C precompiler.
on the dev. machine I get _trusted_ warnings and I am able to link
an application with QT and embedded SQL.
[dev. machine] with "warning: implicit declaration":
painter > nm up8set.o | grep OraCommit
00008bf0 T OraCommit
painter > nm OracleObjects.o | grep OraCommit
U OraCommit
painter > gcc --version
egcs-2.91.66
on the new server, due to the higher gcc-version, I get errors, when
I wanted to leave external functions undeclared. if I declare these
functions "extern ..." the compiler runs fine, but the linker cannot
find the correct symbols, because the compiler generates postfix
characters for the requested procedures.
[prod. server] with explicit declartion "extern int procname(...);":
painter > nm up8set.o | grep OraCommit
000039a0 T OraCommit
painter > nm OracleObjects.o | grep OraCommit
» U OraCommit__Fv
» ^^^^
painter > gcc --version
2.95.2
how can I fix this? is there a known way to tell 'g++' to leave the
requested function identifiers without trailing characters? is there
a way to tell 'g++' to treat implicit declarations simply as a warning?
on the productive machine I cannot step back to an older version,
because it's simply _productive_ :/
any idea? thanks in advance.
--
mfG / best regards
Karl Esau
LOEWE Opta GmbH - Production Data Management
Industriestrasse 11, D-96317 Kronach, Germany
tel : (+49) 9261 99 731
fax : (+49) 9261 99 323
eMail : mailto:karl-heinz.esau (AT)loewe.de
visit : http://www.loewe.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C++ & GCC / nm / symbols with trailing characters / linker errors
2001-08-31 4:58 C++ & GCC / nm / symbols with trailing characters / linker errors Karl Esau
@ 2001-09-04 19:24 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-09-04 19:24 UTC (permalink / raw)
To: karl-heinz.esau; +Cc: GCC help
On Aug 31, 2001, Karl Esau <karl-heinz.esau@loewe.de> wrote:
> [prod. server] with explicit declartion "extern int procname(...);":
Use extern "C" to mark functions as C-compatible, which avoids C++
name mangling.
> is there a way to tell 'g++' to treat implicit declarations simply
> as a warning?
-fpermissive does this, IIRC.
> on the productive machine I cannot step back to an older version,
> because it's simply _productive_ :/
You can always install an older version somewhere else.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-09-04 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-31 4:58 C++ & GCC / nm / symbols with trailing characters / linker errors Karl Esau
2001-09-04 19:24 ` Alexandre Oliva
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).