nangoon / ehci

Automatically exported from code.google.com/p/ehci
0 stars 0 forks source link

Problems with functions getgeneratedimage, getehcigltexture, etc: #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, I am getting similar errors when Im using Ehci. I am trying to use ehci 
along with Kinect XBOX visual camera. I am running it on linux. I have openNI, 
ehci and opencv installed. When I try to compile using the following line:

g++ main.cpp  -I/usr/include/nite -I/usr/include/ni -I/usr/local/include 
-I/usr/local/include -lOpenNI  -lGL -lGLU -lglut -lehci `pkg-config --libs 
--cflags opencv` -lEGL SceneDrawer.cpp HeadTracker.cpp opengles.cpp -o trial

I get the following errors: 

HeadTracker.cpp: In function ‘void keyframeRelated()’:
HeadTracker.cpp:29:26: error: ‘isEhciTextureCreated’ was not declared in 
this scope
HeadTracker.cpp:41:41: error: ‘getEhciGlTexture’ was not declared in this 
scope
HeadTracker.cpp: In function ‘void drawHeadModel(IplImage*, float, 
XnPoint3D)’:
HeadTracker.cpp:96:25: error: ‘setGeneratedImage’ was not declared in this 
scope
HeadTracker.cpp:98:23: error: ‘getGeneratedImage’ was not declared in this 
scope
HeadTracker.cpp:99:59: error: invalid conversion from ‘int’ to 
‘IplImage*’
HeadTracker.cpp:99:59: error:   initializing argument 3 of ‘int ehciLoop(int, 
int, IplImage*)’
HeadTracker.cpp:102:59: error: invalid conversion from ‘int’ to 
‘IplImage*’
HeadTracker.cpp:102:59: error:   initializing argument 3 of ‘int 
ehciLoop(int, int, IplImage*)’

Can you please help?

Thank you, 
Charan

Original issue reported on code.google.com by charand...@gmail.com on 8 Jul 2011 at 2:03

GoogleCodeExporter commented 8 years ago
I figured out the issue. it looks like the code is written in ehci0.7 and I 
have installed ehci 0.6.
 But from what I see, there is no ehci 0.7 available for linux. Is ther any way where I can run a program coded using ehci 0.7 using 0.6? please let me know as I need this desparately in my program!!

Original comment by charand...@gmail.com on 12 Jul 2011 at 9:20

GoogleCodeExporter commented 8 years ago
Hi Charand,

you can get the latest version for Linux (or any platform) through the source 
tab project here in Google code. Just remember that you will need some svn 
client installed. When you have it, use the following string:
svn checkout http://ehci.googlecode.com/svn/trunk/ ehci-read-only

Original comment by danielba...@gmail.com on 12 Jul 2011 at 10:12

GoogleCodeExporter commented 8 years ago
Thank you so much, i have installed ehci 0.6 on my linux ubuntu, 11.04.
I copied the source code of ehci.cpp and ehci.h and placed it in my code 
folder. I get the following errors.

/tmp/ccvmS1gO.o: In function `DrawHead(unsigned int)':
SceneDrawer.cpp:(.text+0x15d2): undefined reference to `g_ImageGenerator'
/tmp/ccLok2ua.o: In function `keyframeRelated()':
HeadTracker.cpp:(.text+0x73): undefined reference to `isEhciTextureCreated()'
HeadTracker.cpp:(.text+0x11a): undefined reference to `getEhciGlTexture()'
/tmp/ccLok2ua.o: In function `drawHeadModel(_IplImage*, float, XnVector3D)':
HeadTracker.cpp:(.text+0x47d): undefined reference to 
`setGeneratedImage(_IplImage*)'
HeadTracker.cpp:(.text+0x489): undefined reference to `getGeneratedImage()'
HeadTracker.cpp:(.text+0x4ab): undefined reference to `ehciLoop'
HeadTracker.cpp:(.text+0x4c8): undefined reference to `ehciLoop'
HeadTracker.cpp:(.text+0x4f8): undefined reference to `getGlPositMatrix'
collect2: ld returned 1 exit status

The command Im using to compile is 
g++ main.cpp  -I/usr/include/nite -I/usr/include/ni -I/usr/local/include 
-lOpenNI  -lGL -lGLU -lglut -lehci `pkg-config --libs --cflags opencv` 
`pkg-config --libs --cflags ehci` -lEGL SceneDrawer.cpp HeadTracker.cpp 
opengles.cpp -o abc

Do i need to place them in some specific folder? do I need to link any other 
library..
Please help me out!! I am new to Linux and Im struggling!!

Original comment by charand...@gmail.com on 12 Jul 2011 at 10:37

GoogleCodeExporter commented 8 years ago
Hi charand,
it is a linker problem. It seems that when compiling main.cpp it is not finding 
the .lib or .so (shared object) of ehci. Can you confirm you have compiled it 
somewhere?
Can you give the output of this command:
pkg-config --libs --cflags ehci
And, from the output you see, example: /home/your_user/your_ehci_place, can you 
list what files are there?
Another option would be to compile ehci.cpp in your project, adding this to 
your g++ line example:
g++ main.cpp  -I/usr/include/nite -I/usr/include/ni -I/usr/local/include 
-lOpenNI  -lGL -lGLU -lglut -lehci `pkg-config --libs --cflags opencv` 
`pkg-config --libs --cflags ehci` -lEGL SceneDrawer.cpp HeadTracker.cpp 
opengles.cpp ehci.cpp -o abc
I know building sometimes get rough...
Kind regards,
Daniel

Original comment by danielba...@gmail.com on 12 Jul 2011 at 3:08

GoogleCodeExporter commented 8 years ago
Thank you so much!! It is working now!!

Original comment by charand...@gmail.com on 31 Jul 2011 at 9:39

GoogleCodeExporter commented 8 years ago
Cool! And what exactly did make it work?
Best regards,
Daniel

Original comment by danielba...@gmail.com on 1 Aug 2011 at 4:17

GoogleCodeExporter commented 8 years ago
I copied the source files of ehci.cpp and ehci.h from source files available
online and pasted them in my my folder along with my other codes. Then i
compiled ehci.cpp along with my files!

Original comment by charand...@gmail.com on 1 Aug 2011 at 6:49

GoogleCodeExporter commented 8 years ago
Sounds great. Thank you!

Original comment by danielba...@gmail.com on 3 Aug 2011 at 2:04