3 of 3
3
Touchlib Installation/Compiling Instructions
Posted: 16 June 2007 01:08 PM   [ Ignore ]   [ # 31 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2293
Moderator

Oh ok. I thought maybe it was just a fault of my own. Do you know where you choose which camera, resolution, and fps to use then?

 Signature 

Follow me on:
My Website - Youtube - Twitter - Linkedin

Profile
 
 
Posted: 12 August 2007 04:29 PM   [ Ignore ]   [ # 32 ]
Rank
Joined  2007-07-28
Total Posts:  36
New Member

Can someone, upload all the working source?? So i just need to press build and no error expected for touch lib?

Profile
 
 
Posted: 12 August 2007 07:57 PM   [ Ignore ]   [ # 33 ]
RankRankRankRank
Joined  2007-01-08
Total Posts:  1038
Member

well i bet you have to install dependencies, put environment paths etc, but take a look at the touchlib website that is linked on nuigroup.com

Profile
 
 
Posted: 13 August 2007 03:06 PM   [ Ignore ]   [ # 34 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2293
Moderator

Have you tried compiling already with all the dependencies in place? I didn’t have to edit anything in order to compile it using Visual Studio 2005.

 Signature 

Follow me on:
My Website - Youtube - Twitter - Linkedin

Profile
 
 
Posted: 14 August 2007 06:10 AM   [ Ignore ]   [ # 35 ]
Rank
Joined  2007-07-28
Total Posts:  36
New Member

what file you open, with VS2005? And the E.variable are set to the DIR folder like c:\touchlib\OPENCV\ or to a specif folder such as the include or lib?

Profile
 
 
Posted: 14 August 2007 06:16 AM   [ Ignore ]   [ # 36 ]
Rank
Joined  2007-07-28
Total Posts:  36
New Member
Joobs - 01 February 2007 04:08 AM

Newbie’s Guide to getting Touchlib to compile.
Jan 6 2007

FOLLOW THESE INSTRUCTIONS AT YOUR OWN RISK!

I am completely new to C++ so it took me a while to get Touchlib to compile, below is a rough “how-to” which will hopefully make the process a little easier for you.

**************************************************************
// Download Files
**************************************************************
Download Visual c++ 2005 Express edition
Download Latest Platform SDK
Download Latest DirectX SDK
Download Open CV
Download VideoWrapper
Download DSVL

Install or Unzip everything into sensible directories


**************************************************************
// Easy way to install the Platform SDK for Visual c++ express
**************************************************************
Visual Studio 2005 Express needs some modification in order to get it working correctly.

Create a directory called “PlatformSDK” under “Program FilesMicrosoft Visual Studio 8VC”
Then copy the “bin”, “include”, and “lib” directory from the PSDK installation directory into this new directory.


**************************************************************
// Add Environment Variables
**************************************************************
Right click “My Computer” and go to “properties”, click the “advanced” tab, and select “Environment Variables”.
Create a New variable for DSVL_HOME with a value of the DSVL installation directory (eg c:multitouchdsvl). 
Repeat for VIDEOWRAPPER_HOME.
Repeat for OPENCV_HOME.


**************************************************************
// Modify altbase.h to work with Visual c++ express
**************************************************************
For now you have to edit a couple files to remove a couple errors.

Taken from http://dev.openwengo.com/trac/openwengo/trac.cgi/wiki/HowToBuildFromSourceNgVs2005

edit “Crasberryrogram FilesMicrosoft Visual Studio 8VCPlatformSDKIncludeatlatlbase.h” (or “crasberryrogram FilesPlatform SDKincludeatlatlbase.h")

Go to around line 287 and comment out the following:

============================================
/*
PVOID __stdcall __AllocStdCallThunk(VOID);
VOID __stdcall __FreeStdCallThunk(PVOID);

#define AllocStdCallThunk() __AllocStdCallThunk()
#define FreeStdCallThunk(p) __FreeStdCallThunk(p)

#pragma comment(lib, “atlthunk.lib")
*/
============================================

And now add the following replacement definition:

============================================
// workaround for not having atlthunk.lib in PSDK or VC++ 2005 Express Edition
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
#define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)
============================================

Error fixed: link error missing atlthunk.lib when building PhApi.dll

Explanation: atlthunk.lib is only delivered with the full version of Visual Studio 2005. However, if ATL classes are not used the workaround described above enables to compile and link correctly.

See the following links for more details:

http://forums.microsoft.com/msdn/showpost.aspx?postid=64509&siteid=1
http://resources.kairo.at/mozilla/build/make-win-tinderbox-vc8express.html


**************************************************************
// Modify ctlutil.h because there is an error in its code???
**************************************************************
Taken from (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=63785&SiteID=1)

Edit Crasberryrogram FilesMicrosoft Platform SDKSamplesMultimediaDirectShowBaseClasses/ctlutil.h

Go to line 278

============================================
private:
// Prevent bugs from constructing from LONG (which gets
// converted to double and then multiplied by 10000000
COARefTime(LONG);
operator=(LONG);
};
============================================

and change

============================================
operator=(LONG);
============================================

to

============================================
COARefTime& operator=(LONG);
============================================


**************************************************************
// Add the include directories
**************************************************************
Now you need to put a few include directories.

Open up the touchlib solution.sln.  Right click the “touchlib” in the solution explorer, and click properties.  Go to C++ tree and click “general”, then click “additional Include Directories” and add:

DirectX include directory (eg “Crasberryrogram FilesMicrosoft DirectX SDK (December 2006)Include")
Crasberryrogram FilesMicrosoft Platform SDKSamplesMultimediaDirectShowBaseClasses
Crasberryrogram FilesMicrosoft Visual Studio 8VCPlatformSDKIncludeatl


**************************************************************
// Now it should compile!
**************************************************************

this whole project can you upload it..?

Profile
 
 
Posted: 14 August 2007 05:53 PM   [ Ignore ]   [ # 37 ]
Rank
Joined  2007-08-07
Total Posts:  1
New Member

this whole project can you upload it..?

Having just built this myself I feel your pain but it is wise to work through it to get it to build so that you can code against it. Also some of the fixes are to files external to the project so you really must change these yourself (or you might hit all sorts of versioning issues). If I get the time I’ll try and zip it all up and upload it somewhere but no promises!

For reference, MY major problem was that I had downloaded the wrong version of openCV and had some strange problems.  I built with VC 2005 Pro and only needed to do the change to ctlutil.h ( line 278, operator=(LONG); changed to COARefTime& operator=(LONG); ) and add the following dependencies (of which I suspect some arnt needed) :-

“C:\Program Files\Microsoft Platform SDK\Samples\Multimedia\DirectShow\BaseClasses";"C:\Program Files\Microsoft DirectX SDK (April 2007)\Include";"C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\atl";"C:\Program Files\Microsoft Platform SDK\Include”

Built everything without issue once the environment variables were set.

Profile
 
 
   
3 of 3
3