Re: Getting rid of duplicate symbols during linking
Tim Bronski <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <[email protected]> |
It looks like the program you built has a number of C++ modules. The
function names have been mangled, which is what C++ does for
overloading. If these functions are to be callable by their "real" names
you should consider putting and "extern C" line in your headers where
the functions are declared. Something like:
#ifdef __cplusplus
extern "C" {
#endif
On 1/5/2016 7:15 PM, Kelly Beard wrote:
> I am porting another programmers library to the IBMi and attempting to link
> a tiny main program to a service program that I have built via a makefile.
> I have never built a service program myself before so I'm trying to learn
> something new. During the linking stage I get these messages:
>
> Definition supplied multiple times for symbol
> '__nw__FUiPv'.
> Definition supplied multiple times for symbol
> '__dftbdt__Q2_3std12codecvt_baseFv'.
> Definition supplied multiple times for symbol
> '__dftbdt__Q2_3std10ctype_baseFv'.
>
> Currently in our production code we use *DUPVAR, *DUPPROC, and *NOWARN but
> we are really trying to tighten the ship and get our code to compile
> cleaner. These symbols appear to come from standard library stuff, I
> assume, since they don't look familiar to me. Are there any techniques I
> can use to track down the code that generates these symbols then kill and
> destroy them? :-)
>
> I am using DSPMOD library/module DETAIL(*EXPORT *IMPORT) via QSH & IFS and
> redirecting all of this to a file, so I can search for these symbols and I
> know where they exist.
>
> FWIW, I am using the 'icc' compiler that is part of the 5799-PTL package.
> It is just a front-end to CRTCPPMOD & CRTPGM. I am also using a makefile &
> the 'gmake' command, along with 'ld' and 'qar'.
>
--
Need sFTP or PGP? Download your native sFTP or OpenPGP solutions here:
www.arpeggiosoftware.com
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.