i donot have graphical version of QNX. so i donot have a nice IDE to work on. i need to make my own makefiles for all the projects i do.
i have made a few make files that work, but i have many problems.
the biggest problem is when i makefiles <iostream.h> doesnt work.
i get “undefined reference” error.
lets take a simple scenario: suppose, say i have “main.cpp” which included “header.h”. “header.h” has its corresponding “header.cpp”. both main.cpp and header.cpp includes other headers like <math.h>, <iostream.h> etc
makefile for such a scenario can be:
executable: main.o header.o
QCC -o executable main.o header.o
main.o: main.cpp header.h
header.o: header.cpp header.h
if i use this, iostream and math.h functions like cout, ,pow are given undefined reference errors. how to fix this?
now, what shud be the name of this make file? and how shud this be run in command line.
can the make file be named xxxx.make?
and to run can we give command
#make -f xxxx.make
i am used to working in VC++ where building is taken care of. Someone please help me in figuring this out. i am completely stuck at this. thanks in advance.