<?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: Compiling error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683066#M53493</link>
    <description>Yes, thats what I meant.  The .c file must be compiled into a .o file with -fPIC.  You don't need to specify this option when building the shared library from the .o files.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
    <pubDate>Thu, 14 Mar 2002 14:37:22 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2002-03-14T14:37:22Z</dc:date>
    <item>
      <title>Compiling error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683062#M53489</link>
      <description>I am using gcc to create a shared&lt;BR /&gt;object.  I am receiving this error:&lt;BR /&gt;/bin/ld: DP relative code in file&lt;BR /&gt;mesg.o - shared library must be&lt;BR /&gt;position independent.  Use +z or +Z to&lt;BR /&gt;recompile.&lt;BR /&gt;&lt;BR /&gt;I am using -fPIC to create the shared&lt;BR /&gt;objects, but am still receiving this&lt;BR /&gt;error.&lt;BR /&gt;&lt;BR /&gt;Should I be using this to compile the&lt;BR /&gt;object as well?</description>
      <pubDate>Thu, 14 Mar 2002 13:13:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683062#M53489</guid>
      <dc:creator>George Bell</dc:creator>
      <dc:date>2002-03-14T13:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683063#M53490</link>
      <description>create shared objects:&lt;BR /&gt;&lt;BR /&gt;# cc -Ae +Z -c test.c&lt;BR /&gt;# gcc -fPIC -c test.c&lt;BR /&gt;&lt;BR /&gt;create a shared lib:&lt;BR /&gt;&lt;BR /&gt;# ld -b -o test.sl test.o&lt;BR /&gt;&lt;BR /&gt;HTH, HAND</description>
      <pubDate>Thu, 14 Mar 2002 13:48:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683063#M53490</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-03-14T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683064#M53491</link>
      <description>Yes, you must use the -fPIC flag when compiling all object files, otherwise you will receive this error.  In your case its complaining about mesg.o - I would remove this object file and make sure it is recompiled with -fPIC.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 14 Mar 2002 14:20:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683064#M53491</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-03-14T14:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683065#M53492</link>
      <description>I am using -fPIC for the object file, do I need to compile the c file with this option as well?</description>
      <pubDate>Thu, 14 Mar 2002 14:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683065#M53492</guid>
      <dc:creator>George Bell</dc:creator>
      <dc:date>2002-03-14T14:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compiling error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683066#M53493</link>
      <description>Yes, thats what I meant.  The .c file must be compiled into a .o file with -fPIC.  You don't need to specify this option when building the shared library from the .o files.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 14 Mar 2002 14:37:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compiling-error/m-p/2683066#M53493</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-03-14T14:37:22Z</dc:date>
    </item>
  </channel>
</rss>

