<?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 extern c linkage in hpitan in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225730#M92045</link>
    <description>hi,&lt;BR /&gt;I am facing a problem where I have a file main.cpp in which I have a function int abc(RequestInfo* request,BaseCommon *(*GetRequest)(RequestInfo *) /*= 0*/) {&lt;BR /&gt;. //My code&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;There is a header file xyz.h which includes &lt;BR /&gt;extern "C" {&lt;BR /&gt; &lt;BR /&gt; extern int abc(RequestInfo *requestInfo, BaseCommon *(*GetRequest)(RequestInfo *) = 0);&lt;BR /&gt;&lt;BR /&gt;  /**&lt;BR /&gt;   * Routines &lt;BR /&gt;   */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This xyz.h is included in main.cpp.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When I create a shared library and try to load my module I get a runtime error which gives me an error &lt;BR /&gt;/usr/lib/hpux64/dld.so: Unsatisfied code symbol 'abc' in load module &lt;MY.SL&gt;&lt;BR /&gt;&lt;BR /&gt;But when I remove the "extern C"  linkage the things work fine.&lt;BR /&gt;&lt;BR /&gt;Please let me what am I missing or is this the expected behaviour.&lt;BR /&gt;&lt;BR /&gt;I am using hpitan 64-bit machine with aCC compiler&lt;/MY.SL&gt;</description>
    <pubDate>Tue, 01 Jul 2008 12:31:30 GMT</pubDate>
    <dc:creator>Steve_The_King</dc:creator>
    <dc:date>2008-07-01T12:31:30Z</dc:date>
    <item>
      <title>extern c linkage in hpitan</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225730#M92045</link>
      <description>hi,&lt;BR /&gt;I am facing a problem where I have a file main.cpp in which I have a function int abc(RequestInfo* request,BaseCommon *(*GetRequest)(RequestInfo *) /*= 0*/) {&lt;BR /&gt;. //My code&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;There is a header file xyz.h which includes &lt;BR /&gt;extern "C" {&lt;BR /&gt; &lt;BR /&gt; extern int abc(RequestInfo *requestInfo, BaseCommon *(*GetRequest)(RequestInfo *) = 0);&lt;BR /&gt;&lt;BR /&gt;  /**&lt;BR /&gt;   * Routines &lt;BR /&gt;   */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This xyz.h is included in main.cpp.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When I create a shared library and try to load my module I get a runtime error which gives me an error &lt;BR /&gt;/usr/lib/hpux64/dld.so: Unsatisfied code symbol 'abc' in load module &lt;MY.SL&gt;&lt;BR /&gt;&lt;BR /&gt;But when I remove the "extern C"  linkage the things work fine.&lt;BR /&gt;&lt;BR /&gt;Please let me what am I missing or is this the expected behaviour.&lt;BR /&gt;&lt;BR /&gt;I am using hpitan 64-bit machine with aCC compiler&lt;/MY.SL&gt;</description>
      <pubDate>Tue, 01 Jul 2008 12:31:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225730#M92045</guid>
      <dc:creator>Steve_The_King</dc:creator>
      <dc:date>2008-07-01T12:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: extern c linkage in hpitan</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225731#M92046</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I would suppose that "hpitan" stands for "HP Itanium", though that's a new abbreviation on me.&lt;BR /&gt;&lt;BR /&gt;Consider the poor search engines...&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 01 Jul 2008 12:35:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225731#M92046</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-07-01T12:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: extern c linkage in hpitan</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225732#M92047</link>
      <description>Have you considered the potential advantages&lt;BR /&gt;of supplying a complete failing test case?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] I have a file main.cpp in which I&lt;BR /&gt;&amp;gt; have a function int abc([...]&lt;BR /&gt;&lt;BR /&gt;So, abc() is in a C++ source file?  And it&lt;BR /&gt;itself is not bracketed by an '"extern C"',&lt;BR /&gt;but its prototype is?  I'm not C++-fluent,&lt;BR /&gt;but I don't think that I'm amazed by your&lt;BR /&gt;problem.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But when I remove the "extern C" linkage&lt;BR /&gt;&amp;gt; the things work fine.&lt;BR /&gt;&lt;BR /&gt;Or, I'd guess, if you add another one around&lt;BR /&gt;abc().  Telling the C++ compiler that you&lt;BR /&gt;have a C function named abc() when you&lt;BR /&gt;actually have a C++ function named abc()&lt;BR /&gt;sounds to me as if it might confuse someone.</description>
      <pubDate>Tue, 01 Jul 2008 17:52:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225732#M92047</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-07-01T17:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: extern C linkage on aCC6</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225733#M92048</link>
      <description>&lt;P&gt;&amp;gt;int abc(RequestInfo*,BaseCommon* (*)(RequestInfo*))&lt;BR /&gt;&lt;BR /&gt;As mentioned by Steven, this isn't a good way to program. You should always be explicit with extern "C", inline, public and virtual keywords.&lt;BR /&gt;&lt;BR /&gt;Your particular case is documented in the porting to aCC6 guide and has your picture on it: :-)&lt;BR /&gt;&lt;A target="_blank" href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2708d7c682f02110d7c682f02110275d6e10RCRD&lt;/A&gt;&lt;BR /&gt;ABI-9. Mangling extern "C" names with parms of type pointer to function&lt;BR /&gt;&lt;BR /&gt;&amp;gt;JRF: I would suppose that "hpitan" stands for "HP Itanium"&lt;BR /&gt;&lt;BR /&gt;The correct term is Integrity or IPF. But the real topic should be aCC6.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Steven: if you add another one around abc(). Telling the C++ compiler that you have a C function named abc() when you actually have a C++ function named abc() sounds to me as if it might confuse someone.&lt;BR /&gt;&lt;BR /&gt;The Standard allow the first linkage spec to be inherited by the second. But there is an "if" about matching. Having pointers to C vs C++ functions causes the match to fail, unless they use a typedef in an extern "C" block.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2011 13:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extern-c-linkage-in-hpitan/m-p/4225733#M92048</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-11T13:55:16Z</dc:date>
    </item>
  </channel>
</rss>

