Ashley
unread,Sep 26, 2011, 2:33:12 PM9/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sparsh-ui
Hi, I was trying to compile the C++ Gesture Server in Eclipse CDT and
I use MinGW's gcc and MySys's make along with boost 1.47.0 in Windows
7 64-bit environment and I was having some road blocks. It seems the
GestureServer-C++.zip I have downloaded is based on a Linux
environment and it hasn't been tested well in Windows environment. So,
these couple of things I had to change in order to make it compile in
windows 7:
1) In the debug.h the LOG_FILE hasn't been defined for WINDOWS and the
preprocessor definition for debug_msg throws error when compiled in
Windows.
Error: "common/debug.h:19:28: error: 'LOG_FILE' was not declared in
this scope"
The code could be
#ifndef DEBUG_H_
#define DEBUG_H_
<code>
#include <stdio.h>
// TODO find out why I couldn't declare this a const *
#ifdef LINUX
#define LOG_FILE "/var/log/sparsh.log"
#elif defined WINDOWS
#define LOG_FILE "C:\\log\\sparsh.log"
#endif
#ifdef DEBUG
#define debug_msg(_format,_aa...) \
FILE * outputFile = fopen(LOG_FILE, "a+"); \
fprintf(outputFile, "File=%s,Func=%s,Line=%d:\n", __FILE__, __func__,
__LINE__); \
fclose(outputFile);
#endif
#endif /*DEBUG_H_*/
</code>
2) In the Properties > C/C++ Build > Tool Chain Editor > Current
toolchain needs to be changed from Linux GCC to MinGW GCC
3) ..\Gestures\/MultiPointDragGesture.h:21:17: error: 'stdext' is not
a namespace-name
I changed the code to comment using namespace stdext and move using
namespace __gnu_cxx out the #ifdef scope
<code>
#ifdef _WIN32
#include <hash_map>
//using namespace stdext;
#else
#include <ext/hash_map>
#endif /* _WIN32 */
using namespace __gnu_cxx;
</code>
Hope if helps someone like me
Thanks
Ashley