I’m running Momentics on a Windows platform. Here is my makefile:
all: test
INCLUDES = -IC:\QNX630\target\qnx6\usr\include\cpp
clean:
-rm main.o test.exe test
test: main.o
QCC $(INCLUDES) -g -o test main.o
main.o: main.cpp
QCC $(INCLUDES) -c -g main.cpp
Here is my source file:
#include
#include
int main()
{
string yourName;
cout << "Enter your name: ";
cin >> yourName;
cout << "Hello " + yourName << endl;
return 0;
}
I also have the include path added via the Project Properties page.
However, when I attempt to build the project, the IDE cannot find the
include files. I get the following response:
make all
MAKE Version 5.0 Copyright (c) 1987, 1997 Borland International
QCC -IC:\QNX630\target\qnx6\usr\include\cpp -c -g main.cpp
main.cpp: In function `int main()’:
main.cpp:6: `string’ undeclared (first use this function)
main.cpp:6: (Each undeclared identifier is reported only once
main.cpp:6: for each function it appears in.)
main.cpp:6: parse error before `;’
main.cpp:8: `cout’ undeclared (first use this function)
main.cpp:9: `cin’ undeclared (first use this function)
main.cpp:9: `yourName’ undeclared (first use this function)
main.cpp:10: `endl’ undeclared (first use this function)
cc: C:/QNX630/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught
signal 33
** error 1 ** deleting main.o
Any suggestions as to how I’m supposed to get the IDE to be able to find the
required header files?
Thanks,
Don