<?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 Re: linker problem? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370508#M713416</link>
    <description>U misspelled the printf as rintf. That is the cause for unsatisfied symbol.</description>
    <pubDate>Thu, 02 Sep 2004 02:18:37 GMT</pubDate>
    <dc:creator>Saravanan_6</dc:creator>
    <dc:date>2004-09-02T02:18:37Z</dc:date>
    <item>
      <title>linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370507#M713415</link>
      <description>I have created a simple Hello World program given below :&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;void hello()&lt;BR /&gt;{&lt;BR /&gt;   rintf("Hello World");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Here instead of printf I have purposfully put an error namely "rintf"&lt;BR /&gt;&lt;BR /&gt;Now I compiled this code using the comand&lt;BR /&gt;/opt/ansic/bin/cc -c +Z -o temp.o temp.c&lt;BR /&gt;&lt;BR /&gt;After compilation I created a library libhello.sl containing the object file created above using the command&lt;BR /&gt;&lt;BR /&gt;/opt/ansic/bin/cc -b temp.o -o libhello.sl&lt;BR /&gt;&lt;BR /&gt;Now the linker is supposed to complain saying "unresolved symbol" for "rintf" but it does not do so. When i use this sl with a sample program still it does not complain about the symbol rintf while compilation. But when I run the sample application, it gives:&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol rintf (code) from ./libhello.sl&lt;BR /&gt;ABORT instruction (core dumped)&lt;BR /&gt;&lt;BR /&gt;Thankyou &lt;BR /&gt;Moiz Khambaty&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 02 Sep 2004 01:06:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370507#M713415</guid>
      <dc:creator>Moiz Khambaty</dc:creator>
      <dc:date>2004-09-02T01:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370508#M713416</link>
      <description>U misspelled the printf as rintf. That is the cause for unsatisfied symbol.</description>
      <pubDate>Thu, 02 Sep 2004 02:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370508#M713416</guid>
      <dc:creator>Saravanan_6</dc:creator>
      <dc:date>2004-09-02T02:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370509#M713417</link>
      <description>hai Moiz,&lt;BR /&gt;&lt;BR /&gt; After doing compilation as cc -c &amp;lt;..&amp;gt; we must have to do link to execute the particular object file. So It is not in the linked format.&lt;BR /&gt;&lt;BR /&gt; During the shared library creation it is creating the shared library file using the non-linked temp.o file&lt;BR /&gt;&lt;BR /&gt; So during the application usage on the sl only it is getting linked and getting compiled as,&lt;BR /&gt;&lt;BR /&gt;/usr/lib/dld.sl: Unresolved symbol rintf (code) from ./libhello.sl&lt;BR /&gt;ABORT instruction (core dumped)&lt;BR /&gt;&lt;BR /&gt; You can try as,&lt;BR /&gt;&lt;BR /&gt; /opt/ansic/bin/cc temp.c -o temp.o&lt;BR /&gt; Some warning will be there from compiler ( -c will supress them and execution file a.out)&lt;BR /&gt;&lt;BR /&gt; If you do it successfully without error then use cc -b temp.o -o libhello.sl&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You will get more problem's for your try as&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;void hello()&lt;BR /&gt;{&lt;BR /&gt;rintf("Hello World");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;as &lt;BR /&gt; 1&amp;gt; no main..&lt;BR /&gt; 2&amp;gt; return type etc&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Muthu&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 02 Sep 2004 02:26:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370509#M713417</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-02T02:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370510#M713418</link>
      <description>Oh sorry I failed to notice &lt;BR /&gt;&lt;BR /&gt;"Here instead of printf I have purposfully put an error namely "rintf" "&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Sep 2004 02:34:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370510#M713418</guid>
      <dc:creator>Saravanan_6</dc:creator>
      <dc:date>2004-09-02T02:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370511#M713419</link>
      <description>the linker does not report unsats from shared libraries by default. it will definitely not error out. if you want warnings, you can get them with the +vshlibunsats linker option.</description>
      <pubDate>Thu, 02 Sep 2004 06:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370511#M713419</guid>
      <dc:creator>ranganath ramachandra</dc:creator>
      <dc:date>2004-09-02T06:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370512#M713420</link>
      <description>+vshlibunsats will give you warnings only when linking the shared library.&lt;BR /&gt;&lt;BR /&gt;+vallunsats when linking an executable will list unsats in the shared libraries in the link line.&lt;BR /&gt;&lt;BR /&gt;now by unsats i mean symbols not resolved but required to be resolved, as far as the linker can find out from the direct calls made in the modules being linked.&lt;BR /&gt;&lt;BR /&gt;when building an executable, the linker expects all symbols to be resolved (unless you say +allowunsats). here the requirement for resolving all referenced symbols is driven/ensured by the compiler specifying 'main' as an unsat in the link line (add -v to compile line to see that). so an unresolved symbol is an error in that case.&lt;BR /&gt;&lt;BR /&gt;when building a shared library, the linker actually allows for unsats. so an unresolved symbol will never be an error, it will be a warning at best.</description>
      <pubDate>Thu, 02 Sep 2004 06:36:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/linker-problem/m-p/3370512#M713420</guid>
      <dc:creator>ranganath ramachandra</dc:creator>
      <dc:date>2004-09-02T06:36:21Z</dc:date>
    </item>
  </channel>
</rss>

