<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ERROR: more than one instance of overloaded function &amp;quot;vprintf&amp;quot; has &amp;quot;C&amp;quot; linkage in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286351#M688653</link>
    <description>Hi people!&lt;BR /&gt;I've got this own library:&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;Personal.h&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;#include &lt;ASSERT.H&gt;&lt;BR /&gt;....&lt;BR /&gt;MY_STREAM *wprintf(MY_STREAM *_this, const char *format, ...);&lt;BR /&gt;....&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Well, this function 'wprintf()' already exists in /usr/include/wchar.h. I can't change Personal.h, because is a customer's library.&lt;BR /&gt;&lt;BR /&gt;I have problems when i try to compile a C++ program -my_program.C- (each one that includes Personal.h).&lt;BR /&gt;&lt;BR /&gt;More, compiling it in a HP-UX B.11.11 PA_RISC (with CC compiler) it was OK. But now, compiling it in a HP-UX B.11.23 ITANIUM (with aCC) I obtain this error:&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;"/usr/include/wchar.h", line 134: error #2338: more than one instance of overloaded function "wprintf" has "C" linkage&lt;BR /&gt;         extern int wprintf __((const wchar_t *, ...));&lt;BR /&gt;                    ^&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;It could be a problem in the order of include files passing to the compiler, but i think it's fine.&lt;BR /&gt;&lt;BR /&gt;I put down the logs of compiler (using option -v). I hope someone can help me.&lt;BR /&gt;Best regards!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;HP-UX B.11.11 PA-RISC (CC)&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;/opt/CC/bin/CC -v &lt;BR /&gt;    -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV -DMOTIF -DY2000 -DSPANIEN &lt;BR /&gt;    +a1 -Aa +DAportable +DS1.1 +z -c /..../my_program.C&lt;BR /&gt;    -I&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;/opt/langtools/lbin/cpp.ansi&lt;BR /&gt;    -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV -DMOTIF -DY2000 -DSPANIEN&lt;BR /&gt;    -I&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;    -D__hp9000s700 -D_PA_RISC1_1 -$ -Z -Dc_plusplus -D__cplusplus -D__hp9000s800 -D__hppa -D__hpux -D__unix -Dhp9000s800&lt;BR /&gt;    -Dhppa -Dhpux -Dunix -I/opt/CC/include/CC -I/usr/include /..../my_program.C /var/tmp/AAAa05164.i&lt;BR /&gt; /opt/CC/lbin/cfront +DAportable +DS1.1 +z +a1 +b1 +T/var/tmp/BAAa05164 +s +t/var/tmp/CAAa05164&lt;BR /&gt; +f/..../my_program.C +XCddp_data.o &lt;BR /&gt;--------------------------------------------&lt;BR /&gt;HP-UX B.11.23 ITANIUM (aCC)&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;/opt/aCC/lbin/ecom -architecture 32 -ia64abi all -inst compiletime&lt;BR /&gt;-sysdir /usr/include -test namespaces -koenig_lookup on -ansi_for_scope on -inline_power 1 -link_type dynamic&lt;BR /&gt;-fpeval float -fpevaldec _Decimal32 -tls_dyn on -target_os 11.23 &lt;BR /&gt;&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;--sys_include /opt/aCC/include_std&lt;BR /&gt;--sys_include /opt/aCC/include_std/iostream_compat&lt;BR /&gt;--sys_include /usr/include --sys_include /usr -D_HP_IA64ABI -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT&lt;BR /&gt;-D__hpux -D__unix -D__ia64=1 -D__ia64__=1 -D_BIG_ENDIAN=1 -D__STDCPP__ -D_HP_NAMESPACE_STD -D_ILP32&lt;BR /&gt;-D__cplusplus=199711L -D_INCLUDE__STDC_A1_SOURCE -D__HP_aCC=62000 -D_HP_INSTANTIATE_T_IN_LIB -D_INLINE_ASM&lt;BR /&gt;-D_FLT_EVAL_METHOD=0 -D_DEC_EVAL_METHOD=0 -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV&lt;BR /&gt;-DMOTIF -DY2000 -DSPANIEN -ucode hdriver=optlevel%1% -plusolistoption -Ol06all! -plusolistoption -Ol13moderate!&lt;BR /&gt;-plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,&lt;BR /&gt;dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,Qs,do,ib,pl,sd,ll,rl,dl,&lt;BR /&gt;Lt,ol,fl,lm,ts,rd,dp,If!&lt;BR /&gt;/..../my_program.C&lt;BR /&gt;&lt;BR /&gt;&lt;/ALL&gt;&lt;/ALL&gt;&lt;/ALL&gt;&lt;/ASSERT.H&gt;&lt;/STRING.H&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;</description>
    <pubDate>Tue, 14 Oct 2008 06:48:10 GMT</pubDate>
    <dc:creator>Chanquete</dc:creator>
    <dc:date>2008-10-14T06:48:10Z</dc:date>
    <item>
      <title>ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286351#M688653</link>
      <description>Hi people!&lt;BR /&gt;I've got this own library:&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;Personal.h&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;#include &lt;ASSERT.H&gt;&lt;BR /&gt;....&lt;BR /&gt;MY_STREAM *wprintf(MY_STREAM *_this, const char *format, ...);&lt;BR /&gt;....&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Well, this function 'wprintf()' already exists in /usr/include/wchar.h. I can't change Personal.h, because is a customer's library.&lt;BR /&gt;&lt;BR /&gt;I have problems when i try to compile a C++ program -my_program.C- (each one that includes Personal.h).&lt;BR /&gt;&lt;BR /&gt;More, compiling it in a HP-UX B.11.11 PA_RISC (with CC compiler) it was OK. But now, compiling it in a HP-UX B.11.23 ITANIUM (with aCC) I obtain this error:&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;"/usr/include/wchar.h", line 134: error #2338: more than one instance of overloaded function "wprintf" has "C" linkage&lt;BR /&gt;         extern int wprintf __((const wchar_t *, ...));&lt;BR /&gt;                    ^&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;It could be a problem in the order of include files passing to the compiler, but i think it's fine.&lt;BR /&gt;&lt;BR /&gt;I put down the logs of compiler (using option -v). I hope someone can help me.&lt;BR /&gt;Best regards!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;HP-UX B.11.11 PA-RISC (CC)&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;/opt/CC/bin/CC -v &lt;BR /&gt;    -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV -DMOTIF -DY2000 -DSPANIEN &lt;BR /&gt;    +a1 -Aa +DAportable +DS1.1 +z -c /..../my_program.C&lt;BR /&gt;    -I&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;/opt/langtools/lbin/cpp.ansi&lt;BR /&gt;    -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV -DMOTIF -DY2000 -DSPANIEN&lt;BR /&gt;    -I&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;    -D__hp9000s700 -D_PA_RISC1_1 -$ -Z -Dc_plusplus -D__cplusplus -D__hp9000s800 -D__hppa -D__hpux -D__unix -Dhp9000s800&lt;BR /&gt;    -Dhppa -Dhpux -Dunix -I/opt/CC/include/CC -I/usr/include /..../my_program.C /var/tmp/AAAa05164.i&lt;BR /&gt; /opt/CC/lbin/cfront +DAportable +DS1.1 +z +a1 +b1 +T/var/tmp/BAAa05164 +s +t/var/tmp/CAAa05164&lt;BR /&gt; +f/..../my_program.C +XCddp_data.o &lt;BR /&gt;--------------------------------------------&lt;BR /&gt;HP-UX B.11.23 ITANIUM (aCC)&lt;BR /&gt;--------------------------------------------&lt;BR /&gt;/opt/aCC/lbin/ecom -architecture 32 -ia64abi all -inst compiletime&lt;BR /&gt;-sysdir /usr/include -test namespaces -koenig_lookup on -ansi_for_scope on -inline_power 1 -link_type dynamic&lt;BR /&gt;-fpeval float -fpevaldec _Decimal32 -tls_dyn on -target_os 11.23 &lt;BR /&gt;&lt;ALL my="" include="" dirs=""&gt;&lt;BR /&gt;--sys_include /opt/aCC/include_std&lt;BR /&gt;--sys_include /opt/aCC/include_std/iostream_compat&lt;BR /&gt;--sys_include /usr/include --sys_include /usr -D_HP_IA64ABI -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT&lt;BR /&gt;-D__hpux -D__unix -D__ia64=1 -D__ia64__=1 -D_BIG_ENDIAN=1 -D__STDCPP__ -D_HP_NAMESPACE_STD -D_ILP32&lt;BR /&gt;-D__cplusplus=199711L -D_INCLUDE__STDC_A1_SOURCE -D__HP_aCC=62000 -D_HP_INSTANTIATE_T_IN_LIB -D_INLINE_ASM&lt;BR /&gt;-D_FLT_EVAL_METHOD=0 -D_DEC_EVAL_METHOD=0 -D_HPUX_SOURCE -DHPUX -DHP9800 -DVERMAJOR=10 -DVERMINOR=0 -DSYSV&lt;BR /&gt;-DMOTIF -DY2000 -DSPANIEN -ucode hdriver=optlevel%1% -plusolistoption -Ol06all! -plusolistoption -Ol13moderate!&lt;BR /&gt;-plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,&lt;BR /&gt;dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,Qs,do,ib,pl,sd,ll,rl,dl,&lt;BR /&gt;Lt,ol,fl,lm,ts,rd,dp,If!&lt;BR /&gt;/..../my_program.C&lt;BR /&gt;&lt;BR /&gt;&lt;/ALL&gt;&lt;/ALL&gt;&lt;/ALL&gt;&lt;/ASSERT.H&gt;&lt;/STRING.H&gt;&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 14 Oct 2008 06:48:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286351#M688653</guid>
      <dc:creator>Chanquete</dc:creator>
      <dc:date>2008-10-14T06:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286352#M688654</link>
      <description>Hi again, people.&lt;BR /&gt;&lt;BR /&gt;If i comile my C++ program (in 11.23 ITANIUM machine) with 'aCC -Ae' i don't obtain the error.&lt;BR /&gt;&lt;BR /&gt;Now i have an important existential doubt. In the previous machine (11.11 PA-RISC) i was compiling with 'cc -Aa' whit no errors. 'cc -Aa' is 'strict ANSI', and it seems to be a more securely option, is it? And i want to do this way in ITANIUM.&lt;BR /&gt;But, by the other side, the libraries and programs i was compiling are between 10 and 20 years ago, i can't change it (i do not want to change it). Furthermore, are in a 95% ANSI C source code, while other source code are C++.&lt;BR /&gt;&lt;BR /&gt;With this info, what do you recommend to do?&lt;BR /&gt;'aCC -Aa' or 'aCC -Ae'?&lt;BR /&gt;&lt;BR /&gt;Thanks so much in advance!</description>
      <pubDate>Tue, 14 Oct 2008 11:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286352#M688654</guid>
      <dc:creator>Chanquete</dc:creator>
      <dc:date>2008-10-14T11:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286353#M688655</link>
      <description>#ifdef __cplusplus&lt;BR /&gt;extern "C" {&lt;BR /&gt;#endif&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDARG.H&gt;&lt;BR /&gt;&lt;BR /&gt;You must never ever put system include files in an extern "C" block!  They are already C++ified.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;/opt/CC/bin/CC&lt;BR /&gt;&lt;BR /&gt;This is the unsupported cfront compiler!&lt;BR /&gt;&lt;BR /&gt;&amp;gt;it seems to be a more securely option, is it?&lt;BR /&gt;&lt;BR /&gt;It might be better to use -AC99.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;With this info, what do you recommend to do?&lt;BR /&gt;'aCC -Aa' or 'aCC -Ae'?&lt;BR /&gt;&lt;BR /&gt;You compile C with cc and C++ with aCC.&lt;BR /&gt;&lt;BR /&gt;Note: If you want strict C89, you use "aCC -AC89", not -Aa.  -Aa means something special in C++ mode.&lt;/STDARG.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 14 Oct 2008 20:45:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286353#M688655</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-14T20:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286354#M688656</link>
      <description>OK Dennis!&lt;BR /&gt;&lt;BR /&gt;I'll try to fix programs to use only aCC, i'm working with very old source code and it will be very 'ugly' to do.&lt;BR /&gt;&lt;BR /&gt;Best regards!</description>
      <pubDate>Wed, 15 Oct 2008 07:03:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286354#M688656</guid>
      <dc:creator>Chanquete</dc:creator>
      <dc:date>2008-10-15T07:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286355#M688657</link>
      <description>&amp;gt;I'll try to fix programs to use only aCC&lt;BR /&gt;&lt;BR /&gt;What are you trying to do?  Compile old C++ source?&lt;BR /&gt;&lt;BR /&gt;Ok, I read a little more closely.&lt;BR /&gt;It seems you have your own version of wprintf.  This is illegal since wprintf is reserved in C99 and C++, 17.4.3.1.3(4).&lt;BR /&gt;&lt;BR /&gt;You could put your wprintf in another namespace and then modify all of the callers.&lt;BR /&gt;&lt;BR /&gt;You could use a macro to rename all of your uses to wprintf.&lt;BR /&gt;&lt;BR /&gt;Or if you compile with -U_INCLUDE__STDC_A1_SOURCE it may make it go away.</description>
      <pubDate>Wed, 15 Oct 2008 07:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286355#M688657</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-15T07:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286356#M688658</link>
      <description>Hi again!&lt;BR /&gt;&lt;BR /&gt;If i compile my C++ sources with '-U_INCLUDE__STDC_A1_SOURCE' option, everything is OK!!!&lt;BR /&gt;&lt;BR /&gt;Can you give me a little explanation of this option? I guess it takes old std libraries, at least it takes the right libraries for my source code compatibility!&lt;BR /&gt;&lt;BR /&gt;Thanks so much Dennis, although i gave you disorganized information, you could find the right solution!&lt;BR /&gt;&lt;BR /&gt;Best wishes!</description>
      <pubDate>Wed, 15 Oct 2008 09:19:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286356#M688658</guid>
      <dc:creator>Chanquete</dc:creator>
      <dc:date>2008-10-15T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286357#M688659</link>
      <description>&amp;gt;Can you give me a little explanation of this option?&lt;BR /&gt;&lt;BR /&gt;The definition of wprintf in &lt;WCHAR.H&gt; is under #ifdef _INCLUDE__STDC_A1_SOURCE.&lt;BR /&gt;Using -U undefines the driver default.&lt;/WCHAR.H&gt;</description>
      <pubDate>Wed, 15 Oct 2008 12:14:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286357#M688659</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-10-15T12:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: more than one instance of overloaded function "vprintf" has "C" linkage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286358#M688660</link>
      <description>You're great, man!&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!</description>
      <pubDate>Wed, 15 Oct 2008 14:01:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-more-than-one-instance-of-overloaded-function-quot-vprintf/m-p/4286358#M688660</guid>
      <dc:creator>Chanquete</dc:creator>
      <dc:date>2008-10-15T14:01:58Z</dc:date>
    </item>
  </channel>
</rss>

