PDA

View Full Version : compiling error




wfs123
May 10, 2011, 04:49 PM
im working on compiling a kinect hack. i ran make in a folder, it started to make it then i got an error... here is the results


HackBook:AS3OpenNI Developer$ make
g++ -c -arch i386 -arch x86_64 -O3 -fno-tree-pre -fno-strict-aliasing -DNDEBUG -msse3 -mssse3 -I../AS3OpenNI -I/usr/include/nite -I/usr/include/ni -I/usr/local/include -DXN_SSE -o Release/main.o main.cpp
main.cpp: In function ‘int main(int, char**)’:
main.cpp:783: error: invalid conversion from ‘void (*)(XnFloat, void*)’ to ‘void (*)(XnUInt32, XnFloat, void*)’
main.cpp:783: error: initializing argument 2 of ‘void* XnVSteadyDetector::RegisterSteady(void*, void (*)(XnUInt32, XnFloat, void*))’
main.cpp: In function ‘int main(int, char**)’:
main.cpp:783: error: invalid conversion from ‘void (*)(XnFloat, void*)’ to ‘void (*)(XnUInt32, XnFloat, void*)’
main.cpp:783: error: initializing argument 2 of ‘void* XnVSteadyDetector::RegisterSteady(void*, void (*)(XnUInt32, XnFloat, void*))’
lipo: can't figure out the architecture type of: /var/folders/Uq/Uqg-h-sKEzKf9PCDQjQOXE+++TY/-Tmp-//cceCeWQB.out
make: *** [Release/main.o] Error 1
HackBook:AS3OpenNI Developer$

please help me!
what am i missing, or doing wrong?
thanks



Bill McEnaney
May 10, 2011, 10:36 PM
main.cpp: In function ‘int main(int, char**)’:
Should a variable name be between the "int" and the comma? I've never seen a prototype for the main() function.

jiminaus
May 10, 2011, 11:36 PM
main.cpp:783: error: invalid conversion from ‘void (*)(XnFloat, void*)’ to ‘void (*)(XnUInt32, XnFloat, void*)’
main.cpp:783: error: initializing argument 2 of ‘void* XnVSteadyDetector::RegisterSteady(void*, void (*)(XnUInt32, XnFloat, void*))’


What's on line 783 of main.cpp? The function given as the 2nd argument to the call to RegisterSteady on the that line has a type mismatch. The function is declared with arguments (XnFloat, void*) but it needs to be (XnUInt32, XnFloat, void*).

wfs123
May 11, 2011, 03:38 PM
never mind... i was in the wrong folder.... thanks for all the help though

will