ofxARToolkitPlus with OF 0.8.0 + CB12.11 + Win7(64bit)

Hi all,
Does anyone have successful on OF 0.8.0 + CB12.11 + Win7(64bit)?
I’ve referred many articles such as -> Augmented Reality on Windows
but still can’t run ofxARToolkitPlus!!!
I’ve also download fishkingsin’s version then port it to my CB12.11,
finally it failed with error message as follows:
obj\Release\addons\ofxARtoolkitPlus\src\ofxARToolkitPlus.o:ofxARToolkitPlus.cpp:(.text+0x306a): undefined reference to `_imp___ZN13ARToolKitPlus18TrackerMultiMarkerC1Eiiiiiii’

can anyone help this? thanks a lot :wink:

1 Like

Hi @kaykay which ofxArtoolkitPlus addon are you using? If you are using this from fishkingsin repo , it will not compile in win64 as it hasn’t the equivalent static lib. You can build the static lib by yourself grab the source from here, remember to change those line in CMakeLists.txt . then put the lib in
ofxARtoolkitPlus/libs/ARToolKitPlus/lib/win64. Let me know if this help you.

Thanks a lot! actually, I’ve never built static lib within CB ><"
after downloaded ARToolKitPlus-2.3.0 (according to ur providing ref. addr.),
I got so many directories as follows:

which files should I take to build? any definite step to build them?

Besides, the fishkingsin repo supposes to be run on win32 successfully, although my env. is win7 64bit, the CB and OF are all 32bit, it seems to get it done, doesn’t it?

You should use cmake to build the lib. Before to start make the changes in CMakeLists.txt as described in the post before. Start cmake, on the top of the GUI there are two tabs the first you define where is the source(ARToolKItplus2.3.0) and the tab above where to build ( create a build folder and set to this). Then press configure button, wait that cmake configuring, if that are isssue they are enlighted with red, then press generate. You should have a makefile and codeblocks project in build folder. If you have some issue post here.
good luck!

p.s. but did you tried with the fishkingsin win32 lib?

Thanks kalwalt. it’s really help! but after finished building, no lib has been generated. my cmake UI screen shot as follows:

I can’t find any lib of ARToolkitlib under any cmake directory. very strange???

BTW, yes! I’ve tried fishkingsin’s win32 lib, but it failed with err msg as below:
obj\Release\addons\ofxARtoolkitPlus\src\ofxARToolkitPlus.o:ofxARToolkitPlus.cpp:(.text+0x306a): undefined reference to `imp__ZN13ARToolKitPlus18TrackerMultiMarkerC1Eiiiiiii’


@kaykay cmake it used only to create the project to build the library, no lib is builded. Cmake will create the project accordingly the compiler you will choose ( makefile or codeblocks with makefile or Visual studio and ect.). but as i see configuring and generating is ok, so you have your project. So you are very close to build it! I see also that you project is builded in cmake- better i think in path/to/ARToolKitPlus-2.3.0/build…

Finally I got the static lib: libARToolKitPlus.a then put it under addons/ofxARtoolkitPlus/libs/ARToolKitPlus/lib/win64, assigned correct linking path,
but I still got 2 error linking message(as follows) after building it :

obj\Release\addons\ofxARtoolkitPlus\src\ofxARToolkitPlus.o:ofxARToolkitPlus.cpp|| undefined reference to _imp___ZN13ARToolKitPlus18TrackerMultiMarkerC1Eiiiiiii'| obj\Release\addons\ofxARtoolkitPlus\src\ofxARToolkitPlus.o:ofxARToolkitPlus.cpp|| undefined reference to_imp___ZN13ARToolKitPlus6Camera13printSettingsEv’|

@kaykay Try to add these cflags in config.make:

USER_CFLAGS = -I/your/path/to/OF/addons/ofxARtoolkitPlus/libs/ARToolKitPlus/include
USER_LDFLAGS = -L/your/path/to/OF/addons/ofxARtoolkitPlus/libs/ARToolKitPlus/lib/win64

CB seems not to use config.make file??? I created a new config.make file which is added ur suggestions above, put it under ARToolkit CB project, the error msg still there.

yes CB on windows doesn’t use config.make, that file is linux/android only. you would need to add those paths in the config of your project in project > build options

also try using the project generator, it should configure the correct paths for you if you add the addon to the project

@kaykay in linux64 i used this flags, this works fine for me:

# add custom variables to this file

# OF_ROOT allows to move projects outside apps/* just set this variable to the
# absoulte path to the OF root folder

OF_ROOT = ../..

# USER_CFLAGS allows to pass custom flags to the compiler
# for example search paths like:
# USER_CFLAGS = -I src/objects

USER_CFLAGS =   -I /home/walter/OF0072/openFrameworks/addons/ofxARToolkitPlus/include -I/home/walter/OF0072/openFrameworks/addons/ofxARToolkitPlus/srcs/MemoryManager.cpp -I/home/walter/OF0072/openFrameworks/addons/ofxARToolkitPlus/srcs/ofxARToolkitPlus.h

# USER_LDFLAGS allows to pass custom flags to the linker
# for example libraries like:
# USER_LDFLAGS = libs/libawesomelib.a


EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj" -I/home/walter/OF0072/openFrameworks/addons/ofxARToolkitPlus/src/TrackerImpl.cxx

# change this to add different compiler optimizations to your project

USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os

# android specific, in case you want to use different optimizations

# android optimizations


NDK_PLATFORM = android-8

# uncomment this for custom application name (if the folder name is different than the application name)
#APPNAME = folderName

# uncomment this for custom package name, must be the same as the java package that contains OFActivity
#PKGNAME = cc.openframeworks.$(APPNAME)

# linux arm flags

LINUX_ARM7_COMPILER_OPTIMIZATIONS = -march=armv7-a -mtune=cortex-a8 -finline-functions -funroll-all-loops  -O3 -funsafe-math-optimizations -mfpu=neon -ftree-vectorize -mfloat-abi=hard -mfpu=vfp

hope that this can help a bit, sorry i don’t use CB in windows so much with OF and even windows OS…

Thanks ur kindly help! Then I’ve tried all methods you guys have provided but failed again.
Here I also paste my CB project setting screen shot, maybe someone can have any idea…:stuck_out_tongue_winking_eye:

i have a Visual studio 2010 project, that i used for my exibition last year, i have to rearrange the code, deleting some parts, but this code it worked for me on windows with OpenFrameworks 0071. Just a bit of patience , and at least you can switch to VS. I’m pretty sure that you are included some source not needed. My VS project don’t use any static or dinamyc library.

OK~ Thanks~ I’ll try more…:slight_smile:

@kaykay You can find here the Visual studio project. If you try it, replace the 3ds files with others , i didn’t uploaded them because are huge in size.

Many thanks kalwalt !!! since these days I’m a little bit busy, only tried it once on my VS express 2013 + OF0071, and got error messages as:
failed to load openframeworksLib … failed to load SculturaAumentata…

mmm… I think I need to update SculturaAumentata.vcxproj, right?
may need a period of time to fix it…

this happens becauseyou are using Visual studio 2013 instead 2010, for example

>   <Import Project="..\..\..\libs\openFrameworksCompiled\project\vs2010\openFrameworksDebug.props" />

should be

 <Import Project="..\..\..\libs\openFrameworksCompiled\project\vs2013\openFrameworksDebug.props" />

you have to change all these vs2010 to vs2013 you can do this with notepad or in Visual Studio.
You can encounter other issues becuase i was using OF 0072. ( maybe opencv lib version are changed…)
I would help you more but i’m busy for my final thesis…sorry!

Finally it runs successfully! many thanks!!!
but, which marker should I use??

Great! Difficult to use the marker i used… print some markers on papers and the press key “t” you should see the “IDnumber…” and a yellow rect around the marker. Change in the code in draw the IDnumber accordingly to your own. But how did you solved the compiling issue?