makefile,icludes and libs hello World example [message #155541] |
Mon, 03 October 2005 06:13 |
Eclipse User |
|
|
|
Originally posted by: Swen.Gerards.web.de
Hello everyone,
i am using eclipse version 3.1.1 and cdt version 3.0.0 and i tried to
enhance the simple (too simple if you ask me) hello World programm from
the FAQ. i tried the following:
#include <d3d9.h>
#include <d3dx9.h>
int main()
{
HRESULT hr = S_OK;
D3DXCOLOR pC1 = D3DXCOLOR(0.0f,0.0f,0.0f,0.0f);
D3DXCOLOR pC2 = D3DXCOLOR(0.5f,0.5f,0.5f,0.5f);
D3DXCOLOR pOut;
D3DXColorAdd(&pOut, &pC1, &pC2);
return 0;
}
with the makefile:
test.exe : test.o
g++ -o test.exe test.o
test.o : test.cpp
g++ -c test.cpp
all : test.exe
clean :
-rm test.exe test.o
quite obviously i am missing out on something because allthough i have
included the path to d3d9.h and d3dx9.h, eclipse tells me that it has no
problem with the first include (d3d9.h) but cant find the second (d3dx9.h)
and they are in the same folder! D3DXCOLOR and D3DXColorAdd are defined in
d3dx9.h.
errors:
make clean all
rm test.exe test.o
rm: cannot lstat `test.exe': No such file or directory
rm: cannot lstat `test.o': No such file or directory
make: [clean] Error 1 (ignored)
g++ -c test.cpp
test.cpp:2:19: d3dx9.h: No such file or directory
test.cpp: In function `int main()':
test.cpp:7: error: `D3DXCOLOR' undeclared (first use this function)
test.cpp:7: error: (Each undeclared identifier is reported only once for
each function it appears in.)
test.cpp:7: error: expected `;' before "pC1"
test.cpp:8: error: expected `;' before "pC2"
test.cpp:9: error: expected `;' before "pOut"
test.cpp:11: error: `pOut' undeclared (first use this function)
test.cpp:11: error: `pC1' undeclared (first use this function)
test.cpp:11: error: `pC2' undeclared (first use this function)
test.cpp:11: error: `D3DXColorAdd' undeclared (first use this function)
make: *** [test.o] Error 1
any ideas?
|
|
|
Powered by
FUDForum. Page generated in 0.02571 seconds