Hello World

Hi List,

I use “ped” to edit these code:

#include <stdio.h>

int
main (void)
{
printf (“Hello, world!\n”);
return (0);
}

my questions are:

  1. which directory should I save this file? I work on a Intel Pentium
    machine.
    because when I try to compile it, the compiler says it can not find
    this file.

  2. I believe I have installed everything in my machine, but when I try
    “qcc”, it
    says:
    #qcc
    /bin/sh: qcc: not found

Thanks

Jun Xu <enguic@unitec.ca> wrote:

Hi List,

I use “ped” to edit these code:

#include <stdio.h

int
main (void)
{
printf (“Hello, world!\n”);
return (0);
}

my questions are:

  1. which directory should I save this file? I work on a Intel Pentium
    machine.
    because when I try to compile it, the compiler says it can not find
    this file.

I would say save it in your home directory, as good a place as any.
If you want to stay organized you should probably make a subdirectory
and put it in there.

  1. I believe I have installed everything in my machine, but when I try
    “qcc”, it
    says:
    #qcc
    /bin/sh: qcc: not found

It looks to me like the development tools are not installed. If you
are running with the initial RTP installation then you will have to
get the development tools. Start the package installer (pkg-installer),
take a look at the repostiory and then select the development tools
package.

Thomas

Also make sure that you don’t try to compile and run this off a
DOS partition. FAT doesn’t maintain permissions on a file so
you won’t be able to execute it.

Erick.


Thomas Fletcher <thomasf@qnx.com> wrote:

Jun Xu <> enguic@unitec.ca> > wrote:
Hi List,

I use “ped” to edit these code:

#include <stdio.h

int
main (void)
{
printf (“Hello, world!\n”);
return (0);
}

my questions are:

  1. which directory should I save this file? I work on a Intel Pentium
    machine.
    because when I try to compile it, the compiler says it can not find
    this file.

I would say save it in your home directory, as good a place as any.
If you want to stay organized you should probably make a subdirectory
and put it in there.

  1. I believe I have installed everything in my machine, but when I try
    “qcc”, it
    says:
    #qcc
    /bin/sh: qcc: not found

It looks to me like the development tools are not installed. If you
are running with the initial RTP installation then you will have to
get the development tools. Start the package installer (pkg-installer),
take a look at the repostiory and then select the development tools
package.

Thomas