<?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: Problem compiling a C program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527670#M890065</link>
    <description>Hi,&lt;BR /&gt;try converting your functions to K&amp;amp;R.&lt;BR /&gt;You can follow this example:&lt;BR /&gt;&lt;BR /&gt;ANSI&lt;BR /&gt;int myfunction(int a, char b) {&lt;BR /&gt;&lt;BR /&gt;/* your code */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;K&amp;amp;R&lt;BR /&gt;&lt;BR /&gt;int myfunction(a,b)&lt;BR /&gt;int a;&lt;BR /&gt;char b;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;/* your code */&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Juan Gonzalez</description>
    <pubDate>Mon, 14 May 2001 13:11:30 GMT</pubDate>
    <dc:creator>Juan González</dc:creator>
    <dc:date>2001-05-14T13:11:30Z</dc:date>
    <item>
      <title>Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527667#M890062</link>
      <description>We have a C program compiled in HP-UX 10. It has been working fine. The exe still works fine on HP11. &lt;BR /&gt;&lt;BR /&gt;Needed to make some minor changes. Now, I cannot compile it. I am getting the following error at every function declaration. &lt;BR /&gt; (Bundled) cc: "mg.c", line 241: error 1705: Function prototypes are an ANSI feature.&lt;BR /&gt;&lt;BR /&gt;Does anyone know, how this bundled CC is different from the regular CC. &lt;BR /&gt;&lt;BR /&gt;Please help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 19:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527667#M890062</guid>
      <dc:creator>Sreeni</dc:creator>
      <dc:date>2001-05-11T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527668#M890063</link>
      <description>You bet. The bundled c compiler is K&amp;amp;R and is really only intended for building kernels.&lt;BR /&gt;If you are doing any even moderately serious development you are going to have the purchase the ANSI C compiler or the aCC compiler (which also does C++). The other option is gcc available for one of the HP-UX porting centers or from &lt;A href="http://www.gnu.org." target="_blank"&gt;www.gnu.org.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards, Clay&lt;BR /&gt;</description>
      <pubDate>Fri, 11 May 2001 20:04:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527668#M890063</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-11T20:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527669#M890064</link>
      <description>Another thing to try is to use the ANSI emulation in the K&amp;amp;R compiler&lt;BR /&gt;I.E.  &lt;BR /&gt;cc -Aa -o ouput.exe myprog.c&lt;BR /&gt;&lt;BR /&gt;It may work if you compiled previously with the K&amp;amp;R compiler and not ANSI.&lt;BR /&gt;&lt;BR /&gt;For allignment and performance it is well worth the HP ANSI/C bundle though, and will remove this error.  My only complaint about ANSI/C is that it does not support new style comments....&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Mon, 14 May 2001 10:55:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527669#M890064</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2001-05-14T10:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527670#M890065</link>
      <description>Hi,&lt;BR /&gt;try converting your functions to K&amp;amp;R.&lt;BR /&gt;You can follow this example:&lt;BR /&gt;&lt;BR /&gt;ANSI&lt;BR /&gt;int myfunction(int a, char b) {&lt;BR /&gt;&lt;BR /&gt;/* your code */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;K&amp;amp;R&lt;BR /&gt;&lt;BR /&gt;int myfunction(a,b)&lt;BR /&gt;int a;&lt;BR /&gt;char b;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;/* your code */&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Juan Gonzalez</description>
      <pubDate>Mon, 14 May 2001 13:11:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527670#M890065</guid>
      <dc:creator>Juan González</dc:creator>
      <dc:date>2001-05-14T13:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527671#M890066</link>
      <description>Juan, &lt;BR /&gt;&lt;BR /&gt;Looks like you are putting me in the right track. Most of my errors went away, when I have changed the way you have suggested, by changing the function definition. &lt;BR /&gt;&lt;BR /&gt;I am still having the compilation errors with the main() function. &lt;BR /&gt;&lt;BR /&gt;My code says : &lt;BR /&gt;&lt;BR /&gt;main(int argc, char *argv[]){&lt;BR /&gt;               ....&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Could you please tell me what would be the syntax in K&amp;amp;R. I am expecting 3 or 4 parameters to the program.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Mon, 14 May 2001 17:15:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527671#M890066</guid>
      <dc:creator>Sreeni</dc:creator>
      <dc:date>2001-05-14T17:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem compiling a C program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527672#M890067</link>
      <description>Hi Sreeni,&lt;BR /&gt;&lt;BR /&gt;The K&amp;amp;R syntax for main is&lt;BR /&gt;&lt;BR /&gt;int main(argc,argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char *argv[];&lt;BR /&gt;{&lt;BR /&gt;  ....&lt;BR /&gt;  ....&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;But again, this is not a very good development environment for anything serious.&lt;BR /&gt;&lt;BR /&gt;Clay&lt;BR /&gt;</description>
      <pubDate>Mon, 14 May 2001 17:18:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-compiling-a-c-program/m-p/2527672#M890067</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-05-14T17:18:58Z</dc:date>
    </item>
  </channel>
</rss>

