Author Topic: Compiling ArToolKit with CodeBlocks as a newbie  (Read 11751 times)

sonderformat

  • Guest
Compiling ArToolKit with CodeBlocks as a newbie
« on: December 08, 2006, 07:19:35 pm »
hi,

i'm trying to compile the ArToolKit
http://www.hitl.washington.edu/artoolkit/
with CodeBlocks.

I did it before with Visual Studio Net at a colleagues machine.
It worked fine.

For compiling i use mingw32-gcc.exe
The first problem i solved was that ming don't like *.lib endings.
i read in the forum.

now i get the next errors.
seems to be a linker problem with the includes.

heres the code
Code
Project   : videoTest
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Programme\ARToolKit\util\videoTest\
--------------------------------------------------------------------------------
Compiling: ..\..\examples\collide\collideTest.c
Linking console executable: ..\..\examples\collide\collideTest.exe
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x1c): undefined reference to `__glutInitWithExit@12'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x3c): undefined reference to `__glutCreateWindowWithExit@8'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x5c): undefined reference to `__glutCreateMenuWithExit@8'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0xac): undefined reference to `arVideoCapStart'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0xc8): undefined reference to `argMainLoop'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0xef): undefined reference to `arUtilTimer'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x125): undefined reference to `arVideoGetImage'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x13a): undefined reference to `arUtilSleep'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x14d): undefined reference to `arUtilTimerReset'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x158): undefined reference to `argDrawMode2D'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x173): undefined reference to `argDispImage'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x178): undefined reference to `arVideoCapNext'
..\..\examples\collide\collideTest.o:collideTest.c:(.text+0x197): undefined reference to `glColor3f@12'

and so on.
any help?

kind regards
norbert


iorec

  • Guest
Re: Compiling ArToolKit with CodeBlocks as a newbie
« Reply #1 on: December 09, 2006, 11:57:49 pm »
helo nobat.

what i found concerning this problem is here:
http://mingw.org/MinGWiki/index.php/Glut?PHPSESSID=0f64793ea275571e93bc90ea4e0c67db

the two relevant bits for me were:
* getting the latest binutils: http://www.mingw.org/download.shtml
binutils seem to be part of mingw. i got a nightly build of codeblocks that ships without mingw and installed mingw in an extra directory. there i just replaced all files from the latest binutils-download with all the exisiting ones.

* linking with glut32.lib instead of lglut32:
go to BuildOptions and click the Linker-tab. under link libraries you replace:
glut32
with:
.\glut32.lib

where .\ references the file in the build directory (i.e. examples\collide\) in your case.

still i get an error after this. now it tells me:
C:\Temp\ARToolKit\examples\collide\..\..\lib/libARgsubd.a(gsub.o):gsub.c:(.text+0x3fd9): undefined reference to `arParamDecompMat'

hm...

sonderformat

  • Guest
Re: Compiling ArToolKit with CodeBlocks as a newbie
« Reply #2 on: December 21, 2006, 06:16:07 pm »
started from zero. with the following.

- a nightly from 19th December.
- MinGW with binutils-2.17.50-20060824-1.tar.gz
- GLUT files in the artoolkit include, the simpletest folder and bin directory. also have the glut.h in the MinGW include folder.
- linked to the include and lib folders under project/build options.

trying to compile the simpleTest Example i get the following.
he is missing a file called comutil.h (DirectShow)

Code
-------------- Build: Debug|Win32 in libARgsub_lite ---------------
Target is up to date.

-------------- Build: Debug|Win32 in libARvideo ---------------
Compiling: videoWin32DirectShow.cpp
In file included from ../../../DSVL/src/DSVL.h:40,
                 from videoWin32DirectShow.cpp:42:
../../../DSVL/src/DSVL_PixelFormatTypes.h:49:7: warning: no newline at end of file
In file included from videoWin32DirectShow.cpp:42:
../../../DSVL/src/DSVL.h:98:3: warning: no newline at end of file

videoWin32DirectShow.cpp:46:21: comutil.h: No such file or directory

Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 2 warnings

I found the file in the Visual Studio include folder.
linked to it. same result.
copied it into the MinGW include folder.
now i get this one

Code
-------------- Build: Debug|Win32 in libARgsub_lite ---------------
Target is up to date.

-------------- Build: Debug|Win32 in libARvideo ---------------
Compiling: videoWin32DirectShow.cpp
In file included from ../../../DSVL/src/DSVL.h:40,
                 from videoWin32DirectShow.cpp:42:
../../../DSVL/src/DSVL_PixelFormatTypes.h:49:7: warning: no newline at end of file
In file included from videoWin32DirectShow.cpp:42:
../../../DSVL/src/DSVL.h:98:3: warning: no newline at end of file
In file included from videoWin32DirectShow.cpp:46:
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In constructor `_variant_t::_variant_t(int)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1297: error: `V_INT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In constructor `_variant_t::_variant_t(unsigned int)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1305: error: `V_UINT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `_variant_t::operator int() const':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1552: error: `V_INT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1558: error: `V_INT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `_variant_t::operator unsigned int() const':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1566: error: `V_UINT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1572: error: `V_UINT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `_variant_t& _variant_t::operator=(const char*)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1805: error: `V_I1REF' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `_variant_t& _variant_t::operator=(int)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1975: error: `V_INT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `_variant_t& _variant_t::operator=(unsigned int)':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:1992: error: `V_UINT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h: In member function `bool _variant_t::operator==(const VARIANT*) const':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:2121: error: `V_INT' was not declared in this scope
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/comutil.h:2124: error: `V_UINT' was not declared in this scope
Process terminated with st

seems to be very hard!

sonderformat

  • Guest
Re: Compiling ArToolKit with CodeBlocks as a newbie
« Reply #3 on: December 22, 2006, 03:57:21 pm »
i found this about using directshow and MinGW
http://home.clara.net/raoulgough/vidmodem/dshow.html

i will go through it the days.
would be cool if somebody could accompany.
we need this for a student project and we want to use code::blocks

regards
norbert

sonderformat

  • Guest
there is no support yet for MinGW or Cygwin to compile ARToolkit
« Reply #4 on: January 04, 2007, 01:34:18 pm »
to close the thread here:

http://www.hitlabnz.org/forum/showthread.php?p=1364#post1364

To cut this long story short: there is no support yet for MinGW or Cygwin to compile ARToolkit into a usable state.
There will be a version with a new video capturing library written in C but there is no ETA.
You might want to have a look at uARToolkit which compiles fine with MinGW and comes with a CodeBlocks workspace.
But its utterly uncomplete, has a different API and I didn't had time to fix various problems.

http://hartmut-seichter.com/svn/uARToolkit/trunk/

Cheers,
Hartmut