<?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: C compiling in UX in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887404#M401744</link>
    <description>Henry,&lt;BR /&gt;if you are going to use C more often it may be worthwhile getting the proper C compiler.&lt;BR /&gt;Either buy the HP product or use free gcc.&lt;BR /&gt;The compiler with the OS is normally only used for kernel compiles, so may not have full functionality.&lt;BR /&gt;Regards&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Feb 2005 03:35:32 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2005-02-23T03:35:32Z</dc:date>
    <item>
      <title>C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887393#M401733</link>
      <description>Hi Guys, &lt;BR /&gt;&lt;BR /&gt;I have this really fundamental question.. how to u compile a C source code in UX?&lt;BR /&gt;&lt;BR /&gt;e.g.  source code "test.c"&lt;BR /&gt;&lt;BR /&gt;#inclde &lt;STDIO&gt;&lt;BR /&gt;&lt;BR /&gt;void main(){&lt;BR /&gt;&lt;BR /&gt;  printf("hello world");&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I try compiling "cc test.c"&lt;BR /&gt;&lt;BR /&gt;but it keep givin me&lt;BR /&gt;&lt;BR /&gt;/usr/ccs/bin/ld: Unexpected end of file in test.c &lt;BR /&gt;&lt;BR /&gt;wats wrong?&lt;/STDIO&gt;</description>
      <pubDate>Tue, 22 Feb 2005 22:43:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887393#M401733</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-22T22:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887394#M401734</link>
      <description>Change &lt;BR /&gt;&lt;BR /&gt;&amp;gt; #inclde &lt;STDIO&gt;&lt;BR /&gt;&amp;gt; void main(){&lt;BR /&gt;&amp;gt; printf("hello world");&lt;BR /&gt;&amp;gt; }&lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;int main ()&lt;BR /&gt;{&lt;BR /&gt;    printf ("hello world");&lt;BR /&gt;    return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;The real error in you code is the first line (#include).&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;&lt;/STDIO.H&gt;&lt;/STDIO&gt;</description>
      <pubDate>Tue, 22 Feb 2005 23:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887394#M401734</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-22T23:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887395#M401735</link>
      <description>Inclusion of header file must be as,&lt;BR /&gt;&lt;BR /&gt;#include &lt;HEADERFILE&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;void main(){&lt;BR /&gt;&lt;BR /&gt;printf("hello world");&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Compile as,&lt;BR /&gt;&lt;BR /&gt;cc -v test.c&lt;BR /&gt;&lt;BR /&gt;It will give more informations.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;/STDIO.H&gt;&lt;/HEADERFILE&gt;</description>
      <pubDate>Tue, 22 Feb 2005 23:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887395#M401735</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-02-22T23:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887396#M401736</link>
      <description>One nitpick.&lt;BR /&gt;It's bad programming practice to use &lt;BR /&gt;void main().&lt;BR /&gt;&lt;BR /&gt;In C, main() is designed to return int, so &lt;BR /&gt;int main() is what you should be using.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Feb 2005 23:51:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887396#M401736</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-22T23:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887397#M401737</link>
      <description>Been trying to compile this source code but keep getting errors returned.. what have I done wrong?&lt;BR /&gt;&lt;BR /&gt;"&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;FCNTL.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;main() {&lt;BR /&gt;  char fn[]="try.txt";&lt;BR /&gt;  struct stat info;&lt;BR /&gt;  int file_descriptor;&lt;BR /&gt;&lt;BR /&gt;  if ((file_descriptor = creat(fn, S_IWUSR)) &amp;lt; 0)&lt;BR /&gt;    perror("creat() error");&lt;BR /&gt;  else {&lt;BR /&gt;    if (fstat(file_descriptor, &amp;amp;info) != 0)&lt;BR /&gt;      perror("fstat() error");&lt;BR /&gt;    else {&lt;BR /&gt;      puts("fstat() returned:");&lt;BR /&gt;      printf("  inode:   %d\n",   (int) info.st_ino);&lt;BR /&gt;      printf(" dev id:   %d\n",   (int) info.st_dev);&lt;BR /&gt;      printf("   mode:   %08x\n",       info.st_mode);&lt;BR /&gt;      printf("  links:   %d\n",         info.st_nlink);&lt;BR /&gt;      printf("    uid:   %d\n",   (int) info.st_uid);&lt;BR /&gt;      printf("    gid:   %d\n",   (int) info.st_gid);&lt;BR /&gt;    }&lt;BR /&gt;    close(file_descriptor);&lt;BR /&gt;    unlink(fn);&lt;BR /&gt;  }&lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;"&lt;/TIME.H&gt;&lt;/STDIO.H&gt;&lt;/FCNTL.H&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Wed, 23 Feb 2005 01:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887397#M401737</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-23T01:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887398#M401738</link>
      <description>Post the compiler error message.&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 01:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887398#M401738</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-23T01:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887399#M401739</link>
      <description>I just cut-n-paste your code and it compiled and&lt;BR /&gt;ran fine on my HP-UX 11.11 system. What exactly&lt;BR /&gt;is the problem you are seeing?&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 01:32:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887399#M401739</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-23T01:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887400#M401740</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;At the end of C file, give one new line. hope It will solve your problem</description>
      <pubDate>Wed, 23 Feb 2005 01:43:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887400#M401740</guid>
      <dc:creator>VEL_1</dc:creator>
      <dc:date>2005-02-23T01:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887401#M401741</link>
      <description>&lt;BR /&gt;In Editor, at the end of C file, give one new line(ENTER) . hope It will solve your problem</description>
      <pubDate>Wed, 23 Feb 2005 01:49:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887401#M401741</guid>
      <dc:creator>VEL_1</dc:creator>
      <dc:date>2005-02-23T01:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887402#M401742</link>
      <description>tech123,&lt;BR /&gt;C compilers don't usually care anout an extra line at &lt;BR /&gt;the end of C file.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 02:01:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887402#M401742</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-23T02:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887403#M401743</link>
      <description>Hi Guys, I am using HPUX10.20b, when I compile this code "cc test.c" it return me:&lt;BR /&gt;"cc: "test.c", line 8: error 1716: Automatic aggregate initialization is an ANSI feature."&lt;BR /&gt;&lt;BR /&gt;so I decided to do it this way "cc -Aa test.c"&lt;BR /&gt;&lt;BR /&gt;it then gives me: "&lt;BR /&gt;cc: "test.c", line 9: error 1574: Unknown size for "info".&lt;BR /&gt;cc: "test.c", line 12: error 1588: "S_IWUSR" undefined.&lt;BR /&gt;cc: "test.c", line 19: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 19: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.&lt;BR /&gt;cc: "test.c", line 20: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 20: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.&lt;BR /&gt;cc: "test.c", line 21: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 21: warning 563: Argument #2 is not the correct type.&lt;BR /&gt;cc: "test.c", line 22: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 22: warning 563: Argument #2 is not the correct type.&lt;BR /&gt;cc: "test.c", line 23: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 23: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.&lt;BR /&gt;cc: "test.c", line 24: error 1530: Undefined struct or union.&lt;BR /&gt;cc: "test.c", line 24: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.&lt;BR /&gt;&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 03:28:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887403#M401743</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-23T03:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887404#M401744</link>
      <description>Henry,&lt;BR /&gt;if you are going to use C more often it may be worthwhile getting the proper C compiler.&lt;BR /&gt;Either buy the HP product or use free gcc.&lt;BR /&gt;The compiler with the OS is normally only used for kernel compiles, so may not have full functionality.&lt;BR /&gt;Regards&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 03:35:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887404#M401744</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-02-23T03:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887405#M401745</link>
      <description>Hi Peter, &lt;BR /&gt;  if this the case, can u advise me where I should go to download the gcc for my hpux10.20b . What should I do to install it?</description>
      <pubDate>Wed, 23 Feb 2005 04:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887405#M401745</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-23T04:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887406#M401746</link>
      <description>Hendry,&lt;BR /&gt;have a look at :&lt;BR /&gt;&lt;A href="https://www.beepz.com/personal/merijn/#Downloads" target="_blank"&gt;https://www.beepz.com/personal/merijn/#Downloads&lt;/A&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 23 Feb 2005 04:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887406#M401746</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-02-23T04:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887407#M401747</link>
      <description>Henry,&lt;BR /&gt;I tried to compile your code on a 11.11 system that &lt;BR /&gt;does not have a ANSI C compiler and I did get the &lt;BR /&gt;error you are getting ("Automatic aggregate &lt;BR /&gt;initialization is an ANSI feature"). The native C &lt;BR /&gt;compiler seems to have a problem with the line&lt;BR /&gt;&lt;BR /&gt;  char fn[]="try.txt";&lt;BR /&gt;&lt;BR /&gt;Changing the above line to the following fixed the &lt;BR /&gt;problem and the program compiled fine without&lt;BR /&gt;ANSI compiler and ran fine.&lt;BR /&gt;&lt;BR /&gt;   char *fn = "try.txt;&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 13:21:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887407#M401747</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-23T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887408#M401748</link>
      <description>Hi Pewter &amp;amp; Biswajit,&lt;BR /&gt;&lt;BR /&gt; Thanks for the feedback, I am trying to install the GNU C compiler now.. but as for the latter, do you see the other errors I have after fixing the first problem? thank u&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Henry&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Feb 2005 21:08:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887408#M401748</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-23T21:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887409#M401749</link>
      <description>Henry wrote:&lt;BR /&gt;&amp;gt; do you see the other errors I have after fixing the &lt;BR /&gt;&amp;gt; first problem? thank u&lt;BR /&gt;&lt;BR /&gt;Though I did not see the other errors, I think all of &lt;BR /&gt;them have one source, the compiler does not know&lt;BR /&gt;about the struct stat. As this is defined in &lt;BR /&gt;sys/stat.h, my guess is that the header is not &lt;BR /&gt;included correctly in your code. Make sure that the &lt;BR /&gt;line &lt;BR /&gt;#include &lt;SYS&gt; &lt;BR /&gt;in your code starts from the first column of the line&lt;BR /&gt;(i.e no spaces before # character).&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;&lt;BR /&gt;&lt;/SYS&gt;</description>
      <pubDate>Wed, 23 Feb 2005 22:47:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887409#M401749</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-23T22:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887410#M401750</link>
      <description>Henry,&lt;BR /&gt;looking at your new thread postings, I guess you managed to get a copy of the 10.20 gcc code and have installed it.&lt;BR /&gt;&lt;BR /&gt;Can you please assign points to answers and close the thread.&lt;BR /&gt;&lt;BR /&gt;Happy coding!&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 24 Feb 2005 02:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887410#M401750</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-02-24T02:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: C compiling in UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887411#M401751</link>
      <description>Have used an alternate system with better compiler.. will be installing the GCC as guided soon. THanks guys!</description>
      <pubDate>Thu, 24 Feb 2005 04:43:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-compiling-in-ux/m-p/4887411#M401751</guid>
      <dc:creator>Henry Chua</dc:creator>
      <dc:date>2005-02-24T04:43:48Z</dc:date>
    </item>
  </channel>
</rss>

