joaquimrocha / Skeltrack

A Free Software skeleton tracking library
GNU Lesser General Public License v3.0
294 stars 63 forks source link

test-kinect.c -- fatal error: gfreenect.h: No such file #11

Open updogliu opened 11 years ago

updogliu commented 11 years ago

When I tried to run make at Skeltrack/examples, the following error came out:

test-kinect.c:1:23: fatal error: gfreenect.h: No such file or directory

I have freeglut3-dev installed. Do I need to install any other packages?

joaquimrocha commented 11 years ago

You have to install GFreenect: https://github.com/elima/GFreenect

updogliu commented 11 years ago

I just installed gfreenect. But It is really hard for me to get the dependencies of test-kinect.c correct. The Makefile didn't find the paths of .h and .os correct. (BTW, I usually rely on CMake to do that job.) Would you please provide a autogen.sh to it (for those who are not familiar with autogen)?

pongraczi commented 10 years ago

Hi, correct steps (in Debian 7), assuming all other development libs installed using your OS package manager (usually *-dev packages).

First, you have to install GFreenect and Skeltrack after that:

GFreenect: wget https://github.com/elima/GFreenect/archive/master.zip unzip master.zip cd GFreenect-master ./autogen.sh ./configure --prefix=/usr make make install

Skeltrack: wget https://github.com/joaquimrocha/Skeltrack/archive/master.zip unzip master.zip cd Skeltrack-master ./autogen.sh ./configure --prefix=/usr --enable-examples=yes --enable-tests=yes make make install

mingjun90 commented 9 years ago

Hi pongraczi after make install, how to run the /tests/test-skeleton.c? I tried several ways and there were different problems. I guess I use the wrong way. could you please tell something about it?

denimalpaca commented 9 years ago

Hi I'm trying to install, I did exactly as pongraczi described (except for enable-tests=no or I get an error) but I still get test-kinect.c:1:23: fatal error: gfreenect.h: No such file or directory when I try to make in examples. I'm running Ubuntu 14.04. Any insight?

joaquimrocha commented 9 years ago

Hi,

You should have gfreenect installed and in a known path (to include the header files) in order to build the examples.

@mingjun90 , Sorry for such a big delay in replying to you! Do you successfully generate the executable? When you run it, what do you get?

denimalpaca commented 9 years ago

I have gfreenect installed (as well as freenect) in my home directory along with skeletrack, Do I have to manually set path variables?

On Thu, Feb 19, 2015 at 12:43 AM, Joaquim Rocha notifications@github.com wrote:

Hi,

You should have gfreenect installed and in a known path (to include the header files) in order to build the examples.

@mingjun90 https://github.com/mingjun90 , Sorry for such a big delay in replying to you! Do you successfully generate the executable? When you run it, what do you get?

— Reply to this email directly or view it on GitHub https://github.com/joaquimrocha/Skeltrack/issues/11#issuecomment-75015631 .

joaquimrocha commented 9 years ago

@denimalpaca The path has to be visible so if you installed it in your home dir, chances are that it is not picking it up. Try adding the dir where you have installed the GFreenect's headers to C_INCLUDE_PATH: export C_INCLUDE_PATH=YOUR_DIR:$C_INCLUDE_PATH

Don't forget to add the .so to the LD_LIBRARY_PATH in a similar fashion.

Hope it works!

Greeshma-babu commented 8 years ago

@joaquimrocha . can you please make it clear.. because it create lots of confusions....

joaquimrocha commented 8 years ago

@Greeshma-babu what do you mean? The LD_LIBRARY_PATH? You set this environment variable to the directory where GFreenect is installed, like: export LD_LIBRARY_PATH=/usr/lib64/:/usr/local/lib/:/usr/local/lib64:/usr/lib/:$LD_LIBRARY_PATH

before you compile Skeltrack's examples.

Greeshma-babu commented 8 years ago

Hello sir, Thanks for your reply.I used to work in window OS,suddenly i need to switch on to Debian linux for my mini project. I don't know the basics of linux command that's why i am not able to follow your instructions and stuck on the last command.Sorry for that inconvenience.

Yours Faithfully, Greeshma Babu

Greeshma-babu commented 8 years ago

This is how i compiled test-kinect.c and got the following error

user@debian:~/Skeltrack/examples$ gcc -o test test-kinect.c pkg-config gfreenect-0.1 --cflags --libs pkg-config skeltrack-0.1 --cflags --libs pkg-config cairo --cflags --libs pkg-config clutter-1.0 --cflags --libs test-kinect.c:15:8: error: unknown type name ‘ClutterContent’ static ClutterContent depth_canvas; ^ test-kinect.c:16:8: error: unknown type name ‘ClutterContent’ static ClutterContent depth_image = NULL; ^ test-kinect.c: In function ‘on_track_joints’: test-kinect.c:46:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:64:19: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c: In function ‘on_depth_frame’: test-kinect.c:182:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:209:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c:216:21: warning: assignment makes pointer from integer without a cast depth_image = clutter_image_new (); ^ test-kinect.c: In function ‘on_video_frame’: test-kinect.c:250:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:253:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (video_tex); ^ test-kinect.c: At top level: test-kinect.c:320:19: error: unknown type name ‘ClutterCanvas’ on_skeleton_draw (ClutterCanvas canvas, ^ test-kinect.c: In function ‘on_destroy’: test-kinect.c:506:3: error: unknown type name ‘ClutterContent’ ClutterContent *content; ^ test-kinect.c:509:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c: In function ‘on_new_kinect_device’: test-kinect.c:552:13: warning: assignment makes pointer from integer without a cast depth_tex = clutter_actor_new (); ^ test-kinect.c:553:16: warning: assignment makes pointer from integer without a cast depth_canvas = clutter_canvas_new (); ^ test-kinect.c:559:13: warning: assignment makes pointer from integer without a cast video_tex = clutter_actor_new (); ^ In file included from /usr/include/glib-2.0/gobject/gobject.h:28:0, from /usr/include/glib-2.0/gobject/gbinding.h:29, from /usr/include/glib-2.0/glib-object.h:23, from /usr/local/include/gfreenect-0.1/gfreenect-device.h:26, from /usr/local/include/gfreenect-0.1/gfreenect.h:26, from test-kinect.c:1: test-kinect.c:590:33: error: ‘on_skeleton_draw’ undeclared (first use in this function) G_CALLBACK (on_skeleton_draw), ^ /usr/include/glib-2.0/gobject/gsignal.h:472:60: note: in definition of macro ‘g_signal_connect’ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) ^ test-kinect.c:590:21: note: in expansion of macro ‘G_CALLBACK’ G_CALLBACK (on_skeleton_draw), ^ test-kinect.c:590:33: note: each undeclared identifier is reported only once for each function it appears in G_CALLBACK (on_skeleton_draw), ^ /usr/include/glib-2.0/gobject/gsignal.h:472:60: note: in definition of macro ‘g_signal_connect’ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) ^ test-kinect.c:590:21: note: in expansion of macro ‘G_CALLBACK’ G_CALLBACK (on_skeleton_draw), ^ since clutter content error was shown, i reinstalled clutter. but the same error happened. i am on Linux debian 8. any sol?

criverc commented 8 years ago

@Greeshma-babu

What do you get when you type:

pkg-config clutter-1.0 --cflags --libs

?

LuisAlbertZM commented 7 years ago

Hello everyone!

I am experiencing the exact same problem. When I type: pkg-config clutter-1.0 --cflags --libs I get:

-pthread -I/usr/local/include/clutter-1.0 -I/usr/local/include/atk-1.0 -I/usr/local/include/cogl -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/json-glib-1.0 -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -L/usr/local/lib -lclutter-glx-1.0 -lcairo-gobject -latk-1.0 -lpangocairo-1.0 -lcairo -lcogl-pango -lcogl -lgdk_pixbuf-2.0 -lgmodule-2.0 -pthread -ljson-glib-1.0 -lgio-2.0 -lGL -ldrm -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lX11 -lXext -lXdamage -lXfixes -lXcomposite -lXi

I can really get whatś going on, so far I have spent quite a lot of time trying to get it running. It seems that for some reason the example program can't load clutter things.

Ahmedgr9 commented 2 years ago

This is how i compiled test-kinect.c and got the following error

user@debian:~/Skeltrack/examples$ gcc -o test test-kinect.c pkg-config gfreenect-0.1 --cflags --libs pkg-config skeltrack-0.1 --cflags --libs pkg-config cairo --cflags --libs pkg-config clutter-1.0 --cflags --libs test-kinect.c:15:8: error: unknown type name ‘ClutterContent’ static ClutterContent depth_canvas; ^ test-kinect.c:16:8: error: unknown type name ‘ClutterContent’ static ClutterContent depth_image = NULL; ^ test-kinect.c: In function ‘on_track_joints’: test-kinect.c:46:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:64:19: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c: In function ‘on_depth_frame’: test-kinect.c:182:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:209:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c:216:21: warning: assignment makes pointer from integer without a cast depth_image = clutter_image_new (); ^ test-kinect.c: In function ‘on_video_frame’: test-kinect.c:250:3: error: unknown type name ‘ClutterContent’ ClutterContent content; ^ test-kinect.c:253:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (video_tex); ^ test-kinect.c: At top level: test-kinect.c:320:19: error: unknown type name ‘ClutterCanvas’ on_skeleton_draw (ClutterCanvas canvas, ^ test-kinect.c: In function ‘on_destroy’: test-kinect.c:506:3: error: unknown type name ‘ClutterContent’ ClutterContent *content; ^ test-kinect.c:509:11: warning: assignment makes pointer from integer without a cast content = clutter_actor_get_content (depth_tex); ^ test-kinect.c: In function ‘on_new_kinect_device’: test-kinect.c:552:13: warning: assignment makes pointer from integer without a cast depth_tex = clutter_actor_new (); ^ test-kinect.c:553:16: warning: assignment makes pointer from integer without a cast depth_canvas = clutter_canvas_new (); ^ test-kinect.c:559:13: warning: assignment makes pointer from integer without a cast video_tex = clutter_actor_new (); ^ In file included from /usr/include/glib-2.0/gobject/gobject.h:28:0, from /usr/include/glib-2.0/gobject/gbinding.h:29, from /usr/include/glib-2.0/glib-object.h:23, from /usr/local/include/gfreenect-0.1/gfreenect-device.h:26, from /usr/local/include/gfreenect-0.1/gfreenect.h:26, from test-kinect.c:1: test-kinect.c:590:33: error: ‘on_skeleton_draw’ undeclared (first use in this function) G_CALLBACK (on_skeleton_draw), ^ /usr/include/glib-2.0/gobject/gsignal.h:472:60: note: in definition of macro ‘g_signal_connect’ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) ^ test-kinect.c:590:21: note: in expansion of macro ‘G_CALLBACK’ G_CALLBACK (on_skeleton_draw), ^ test-kinect.c:590:33: note: each undeclared identifier is reported only once for each function it appears in G_CALLBACK (on_skeleton_draw), ^ /usr/include/glib-2.0/gobject/gsignal.h:472:60: note: in definition of macro ‘g_signal_connect’ g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0) ^ test-kinect.c:590:21: note: in expansion of macro ‘G_CALLBACK’ G_CALLBACK (on_skeleton_draw), ^ since clutter content error was shown, i reinstalled clutter. but the same error happened. i am on Linux debian 8. any sol?

I am facing the same problem , any updates ?

joaquimrocha commented 2 years ago

Sorry, it's been many years since I last compiled Skeltrack. It looks like it cannot find clutter. This is provided by libclutter-1.0-dev on Debian.

I cannot unfortunately dedicate time to Skeltrack any more, so I cannot look into this in detail.