My "Hello world" program dosent execute

I have a AMD 1400 Mhz and 256 Meg.

The program is a hello.cpp file made with “ped”
it use stdio lib and printf(). (as the help tutorial)

I compile it with QCC

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

The new file exec is created

But i am not able to execute it.

QCC is set properly set to -V x86 by default

Thank you for your time.

jspqnx@sympatico.ca

“Jean-Sebastien Perron” <jspovray@sympatico.ca> wrote in message
news:a206jt$hrb$1@inn.qnx.com

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

If you specify qcc -Wall , You should get some more warning if they are
applicable.

The new file exec is created

But i am not able to execute it.

More elaboration is needed here - what happens when you try to execute it?
Are you prefixing a “./” in front of the binary name? ie. ./runme

The “./” is required (unless you have the current directory as part of your
path) to execute the binary.


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

Aren’t you calling your program ‘test’ ? :slight_smile:

If you do, try to remember first basic rule of Unix programming: do NOT call
your test program ‘test’, because ‘test’ is name of shell built-in function
(which prints nothing).

  • igor

“Jean-Sebastien Perron” <jspovray@sympatico.ca> wrote in message
news:a206jt$hrb$1@inn.qnx.com

I have a AMD 1400 Mhz and 256 Meg.

The program is a hello.cpp file made with “ped”
it use stdio lib and printf(). (as the help tutorial)

I compile it with QCC

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

The new file exec is created

But i am not able to execute it.

QCC is set properly set to -V x86 by default

Thank you for your time.

jspqnx@sympatico.ca

I can’t tell you how many times I’ve done that…:wink: Now I’ve got “./”
programmed into my fingers like “:wq”

cheers,

Kris

“Igor Kovalenko” <kovalenko@home.com> wrote in message
news:a2fan7$eoc$1@inn.qnx.com

Aren’t you calling your program ‘test’ ? > :slight_smile:

If you do, try to remember first basic rule of Unix programming: do NOT
call
your test program ‘test’, because ‘test’ is name of shell built-in
function
(which prints nothing).

  • igor

“Jean-Sebastien Perron” <> jspovray@sympatico.ca> > wrote in message
news:a206jt$hrb$> 1@inn.qnx.com> …
I have a AMD 1400 Mhz and 256 Meg.

The program is a hello.cpp file made with “ped”
it use stdio lib and printf(). (as the help tutorial)

I compile it with QCC

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

The new file exec is created

But i am not able to execute it.

QCC is set properly set to -V x86 by default

Thank you for your time.

jspqnx@sympatico.ca

You should always need to do a ./ (unless it’s a tool on your path).
Having the current directory as part of your path is bad, especially when
you enter a directy containing binaries for a different platform, with the
same name as your toolset (ie. ls, pidin etc).


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:a2hf1k$ase$1@nntp.qnx.com

I can’t tell you how many times I’ve done that…> :wink: > Now I’ve got “./”
programmed into my fingers like “:wq”

cheers,

Kris

“Igor Kovalenko” <> kovalenko@home.com> > wrote in message
news:a2fan7$eoc$> 1@inn.qnx.com> …
Aren’t you calling your program ‘test’ ? > :slight_smile:

If you do, try to remember first basic rule of Unix programming: do NOT
call
your test program ‘test’, because ‘test’ is name of shell built-in
function
(which prints nothing).

  • igor

“Jean-Sebastien Perron” <> jspovray@sympatico.ca> > wrote in message
news:a206jt$hrb$> 1@inn.qnx.com> …
I have a AMD 1400 Mhz and 256 Meg.

The program is a hello.cpp file made with “ped”
it use stdio lib and printf(). (as the help tutorial)

I compile it with QCC

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

The new file exec is created

But i am not able to execute it.

QCC is set properly set to -V x86 by default

Thank you for your time.

jspqnx@sympatico.ca

\

Mostly security though…Your friendly neighborhood sysadmin has ‘.’ in his
path…you have a binary ‘ls’ in your homedir. “Hey sysadmin, could you
look at this weird file in my home dir?” and the next thing you know, you’re
root.

cheers,

Kris

“Adam Mallory” <amallory@qnx.com> wrote in message
news:a2jt48$57c$1@nntp.qnx.com

You should always need to do a ./ (unless it’s a tool on your path).
Having the current directory as part of your path is bad, especially when
you enter a directy containing binaries for a different platform, with the
same name as your toolset (ie. ls, pidin etc).


Cheers,
Adam

QNX Software Systems Ltd.
[ > amallory@qnx.com > ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <> pschon@baste.magibox.net
“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:a2hf1k$ase$> 1@nntp.qnx.com> …
I can’t tell you how many times I’ve done that…> :wink: > Now I’ve got “./”
programmed into my fingers like “:wq”

cheers,

Kris

“Igor Kovalenko” <> kovalenko@home.com> > wrote in message
news:a2fan7$eoc$> 1@inn.qnx.com> …
Aren’t you calling your program ‘test’ ? > :slight_smile:

If you do, try to remember first basic rule of Unix programming: do
NOT
call
your test program ‘test’, because ‘test’ is name of shell built-in
function
(which prints nothing).

  • igor

“Jean-Sebastien Perron” <> jspovray@sympatico.ca> > wrote in message
news:a206jt$hrb$> 1@inn.qnx.com> …
I have a AMD 1400 Mhz and 256 Meg.

The program is a hello.cpp file made with “ped”
it use stdio lib and printf(). (as the help tutorial)

I compile it with QCC

No warning or error (in fact no message)
NB: if i put error in my code, there is error messages.

The new file exec is created

But i am not able to execute it.

QCC is set properly set to -V x86 by default

Thank you for your time.

jspqnx@sympatico.ca



\