<?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: g++ problem when compiling under HP-UX 11 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900789#M701723</link>
    <description>For strict syntax, one of the most important things is to make sure that you use gcc to compile C code and g++ to compile C++ code.  Other than that I would just examine the compile output for any warnings that might be pointing out possible problems.  To create static objects (no shared libraries) you can link with the --static option (assuming you are using gcc or g++ for the link.&lt;BR /&gt;&lt;BR /&gt;You don't mention what version of gcc/g++ you are using.  If it isn't at least 3.4, I would try updating the gcc/g++ compilers.  You can get new ones from &lt;A href="http://www.hp.com/go/gcc." target="_blank"&gt;http://www.hp.com/go/gcc.&lt;/A&gt;</description>
    <pubDate>Tue, 10 May 2005 13:34:05 GMT</pubDate>
    <dc:creator>Steve Ellcey</dc:creator>
    <dc:date>2005-05-10T13:34:05Z</dc:date>
    <item>
      <title>g++ problem when compiling under HP-UX 11</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900787#M701721</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have an odd cross-compilation issue. I recieved some code (which is written in mixed C/C++) which compiles with the FFTW library (&lt;A href="http://www.fftw.org)." target="_blank"&gt;www.fftw.org).&lt;/A&gt; It compiles under Redhat Linux with no problems, and runs fine.&lt;BR /&gt;&lt;BR /&gt;However, when I compiled it using the HP-UX version of g++, I recieved no obvious warnings, but the code fails with a segmentation fault (core dump). According to gdb, the failure jumps around in the code between runs and occurs on simple lines (such as sending a string to cout).&lt;BR /&gt;&lt;BR /&gt;I've been given the following advice about the compiler:&lt;BR /&gt;1. Reduce the optimisation level&lt;BR /&gt;2. Enforce strict syntax&lt;BR /&gt;3. Compile as static objects (larger executable)&lt;BR /&gt;&lt;BR /&gt;I've tried no optimization, and debug-only (-g) optimization, but it seems to make no difference.&lt;BR /&gt;&lt;BR /&gt;My question is twofold...&lt;BR /&gt;1. Can anyone help me to find relevent compiler switches which will allow me to try points 2 and 3 above (the documentaiton is long-winded and technical!)&lt;BR /&gt;2. Does anyone else have any suggestions as to what is causing the problem, and how to fix it?&lt;BR /&gt;&lt;BR /&gt;The symptoms suggest a pointer problem, but it runs with no problems under Linux, and its completely baffling me!&lt;BR /&gt;&lt;BR /&gt;Thanks for any help.</description>
      <pubDate>Mon, 09 May 2005 03:52:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900787#M701721</guid>
      <dc:creator>Andrew Bennett_5</dc:creator>
      <dc:date>2005-05-09T03:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: g++ problem when compiling under HP-UX 11</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900788#M701722</link>
      <description>Let me direct you here: &lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Physics/fftw-3.0.1/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Physics/fftw-3.0.1/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hopefully the instructions &lt;A href="http://hpux.ee.ualberta.ca/hppd/cgi-bin/wwwtar?/hpux/Physics/fftw-3.0.1/fftw-3.0.1-ss-11.11.tar.gz+fftw-3.0.1/HPUX.Install+text" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/cgi-bin/wwwtar?/hpux/Physics/fftw-3.0.1/fftw-3.0.1-ss-11.11.tar.gz+fftw-3.0.1/HPUX.Install+text&lt;/A&gt; can help?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Mon, 09 May 2005 05:11:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900788#M701722</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-05-09T05:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: g++ problem when compiling under HP-UX 11</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900789#M701723</link>
      <description>For strict syntax, one of the most important things is to make sure that you use gcc to compile C code and g++ to compile C++ code.  Other than that I would just examine the compile output for any warnings that might be pointing out possible problems.  To create static objects (no shared libraries) you can link with the --static option (assuming you are using gcc or g++ for the link.&lt;BR /&gt;&lt;BR /&gt;You don't mention what version of gcc/g++ you are using.  If it isn't at least 3.4, I would try updating the gcc/g++ compilers.  You can get new ones from &lt;A href="http://www.hp.com/go/gcc." target="_blank"&gt;http://www.hp.com/go/gcc.&lt;/A&gt;</description>
      <pubDate>Tue, 10 May 2005 13:34:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900789#M701723</guid>
      <dc:creator>Steve Ellcey</dc:creator>
      <dc:date>2005-05-10T13:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: g++ problem when compiling under HP-UX 11</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900790#M701724</link>
      <description>A little thing about "-g" flag. With "-g" you get larger executable with lower performance. I suggest that during the development use -g for debugging, but the production version, don't compile with -g. It increases performance.</description>
      <pubDate>Tue, 10 May 2005 14:32:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900790#M701724</guid>
      <dc:creator>Alex Lavrov.</dc:creator>
      <dc:date>2005-05-10T14:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: g++ problem when compiling under HP-UX 11</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900791#M701725</link>
      <description>Thanks for all your input. It turns out that I hadn't read the FFTW documentation properly: there's a known problem with g++/gcc versions prior to 3.2, and I've been using 3.0. Using an updated version got it working!</description>
      <pubDate>Wed, 11 May 2005 02:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/g-problem-when-compiling-under-hp-ux-11/m-p/4900791#M701725</guid>
      <dc:creator>Andrew Bennett_5</dc:creator>
      <dc:date>2005-05-11T02:15:34Z</dc:date>
    </item>
  </channel>
</rss>

