Trouble getting started

I just installed Windows hosted Momentics 6.3.0 PE for the first time and am
trying to compile and run a hello world program using the tutorial. No Joy.

I followed the tutorial steps in the C/C++ Development User Guide to the
letter, but when I compile I get the following errors in the C-build window:

make -k clean all
main.o: No such file or directory

hello.exe: No such file or directory

rm main.o hello.exe

make: *** [clean] Error 1

process_begin: CreateProcess((null), g++ -c -g main.cpp, …) failed.

make (e=2): The system cannot find the file specified.

make: *** [main.o] Error 2

make: Target `all’ not remade because of errors.

g++ -c -g main.cpp

Not sure if the system can’t find the source file or g++. Is g++ not
installed? Path problems? Anyone there ever run the tutorial?

By the way, the documentation refers to a Managed Make C++ project, but
there is no option for that on my system.

Ken Schumm wrote:

I just installed Windows hosted Momentics 6.3.0 PE for the first time and am
trying to compile and run a hello world program using the tutorial. No Joy.

I followed the tutorial steps in the C/C++ Development User Guide to the
letter, but when I compile I get the following errors in the C-build window:

make -k clean all
main.o: No such file or directory

hello.exe: No such file or directory

rm main.o hello.exe

make: *** [clean] Error 1

Could you post your Makefile contents? It should be something like
this, assuming that your code is in main.cpp and you want an executable
named “hello”:

CC:=qcc
CPP:=qcc

main.o: main.cpp

hello: main.o
$(CC) $(LDFLAGS) -o hello main.o

Note that the character before “$(CC)” in the last line must be a tab,
not spaces.

process_begin: CreateProcess((null), g++ -c -g main.cpp, …) failed.

make (e=2): The system cannot find the file specified.

make: *** [main.o] Error 2

make: Target `all’ not remade because of errors.

g++ -c -g main.cpp

Not sure if the system can’t find the source file or g++. Is g++ not
installed? Path problems? Anyone there ever run the tutorial?

I started here a bit over a month ago, so I’ve recently gone through the
tutorials, with no trouble.

By the way, the documentation refers to a Managed Make C++ project, but
there is no option for that on my system.

I can’t find any mention of “managed make” in the Momentics IDE User’s
Guide; where did you find this?


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

“Chris Herborth” <cherborth@qnx.com> wrote in message
news:ce5pn7$kh0$1@inn.qnx.com

Ken Schumm wrote:
I just installed Windows hosted Momentics 6.3.0 PE for the first time
and am
trying to compile and run a hello world program using the tutorial. No
Joy.

I followed the tutorial steps in the C/C++ Development User Guide to the
letter, but when I compile I get the following errors in the C-build
window:

make -k clean all
main.o: No such file or directory

hello.exe: No such file or directory

rm main.o hello.exe

make: *** [clean] Error 1

Could you post your Makefile contents? It should be something like
this, assuming that your code is in main.cpp and you want an executable
named “hello”:

CC:=qcc
CPP:=qcc

main.o: main.cpp

hello: main.o
$(CC) $(LDFLAGS) -o hello main.o

Note that the character before “$(CC)” in the last line must be a tab,
not spaces.

Here is the makefile contents. This was cut and pasted from the tutorial
documentation (and leading spaces were replaced with tab characters).

all: hello.exe
clean:

-rm main.o hello.exe

hello.exe: main.o

g++ -g -o hello main.o

main.o:

g++ -c -g main.cpp

I used your makefile and it worked. It looks like the tutorial docs are in
error, very confusing for somebody new to the product.

[…]

Ken Schumm wrote:

“Chris Herborth” <> cherborth@qnx.com> > wrote in message
news:ce5pn7$kh0$> 1@inn.qnx.com> …

Ken Schumm wrote:

I just installed Windows hosted Momentics 6.3.0 PE for the first time

and am

trying to compile and run a hello world program using the tutorial. No

Joy.

I followed the tutorial steps in the C/C++ Development User Guide to the
letter, but when I compile I get the following errors in the C-build

window:

make -k clean all
main.o: No such file or directory

hello.exe: No such file or directory

rm main.o hello.exe

make: *** [clean] Error 1

Could you post your Makefile contents? It should be something like
this, assuming that your code is in main.cpp and you want an executable
named “hello”:

CC:=qcc
CPP:=qcc

main.o: main.cpp

hello: main.o
$(CC) $(LDFLAGS) -o hello main.o

Note that the character before “$(CC)” in the last line must be a tab,
not spaces.


Here is the makefile contents. This was cut and pasted from the tutorial
documentation (and leading spaces were replaced with tab characters).

all: hello.exe
clean:

-rm main.o hello.exe

hello.exe: main.o

g++ -g -o hello main.o

main.o:

g++ -c -g main.cpp

I used your makefile and it worked. It looks like the tutorial docs are in
error, very confusing for somebody new to the product.

[…]


That tutorial is the stock CDT tutorial - it’s not QNX specific.

We don’t ship a g++.exe, however we DO have ntox86-g++.exe,
ntosh-g++.exe etc etc…

I spoke to soon. It didn’t work. I didn’t get any errors because make quit
after not finding all and clean targets. Adding those targets in to the make
you posted caused the same errors as previously reported.

It seems that something in the environment is not set up correctly when
doing a virgin install of the IDE.

Ken Schumm wrote:

Here is the makefile contents. This was cut and pasted from the tutorial
documentation (and leading spaces were replaced with tab characters).

all: hello.exe
clean:

-rm main.o hello.exe

hello.exe: main.o

g++ -g -o hello main.o

main.o:

g++ -c -g main.cpp

This is what I see in the Momentics IDE User’s Guide Tutorials appendix,
under “Tutorial 1 - creating a standard make C/C++ project”:

CC=qcc

hello: hello.c

which is incomplete, it needs all: and clean: targets:

all: hello

clean:
rm -f hello hello.o

I’ll update the doc.

I used your makefile and it worked. It looks like the tutorial docs are in
error, very confusing for somebody new to the product.

I think you’re looking at Eclipse documentation, not Momentics
documentation… have you tried the tutorials in the QNX Momentics
Development Suite V 6.3 Integrated Development Environment User’s Guide?
You can view it online by selecting “Help Contents” from the “Help”
menu in the IDE, then expand “QNX Momentics Professional Edition” and
then “Integrated Development Environment”.


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

[…]

I think you’re looking at Eclipse documentation, not Momentics
documentation… have you tried the tutorials in the QNX Momentics
Development Suite V 6.3 Integrated Development Environment User’s Guide?
You can view it online by selecting “Help Contents” from the “Help”
menu in the IDE, then expand “QNX Momentics Professional Edition” and
then “Integrated Development Environment”.


Chris Herborth (> cherborth@qnx.com> )
Never send a monster to do the work of an evil scientist.

Chris, I think you’re right. Since the C/C++ development topic was at the
top level of the help contents I went there first (quite naturally I think).
To us folks new to the environment, who don’t know Eclipse from Adam, it’s
sort of confusing. Anyway, thanks for setting me straight.