Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW 4.8 compatibility #359

Closed
stepanmracek opened this issue Jan 20, 2014 · 2 comments
Closed

MinGW 4.8 compatibility #359

stepanmracek opened this issue Jan 20, 2014 · 2 comments
Milestone

Comments

@stepanmracek
Copy link

Hi,
I'm very satisfied freenect user on my Linux box. However, I'm trying to compile my code on Windows using MinGW 4.8 compiler shipped with Qt 5.2.0.

I'm compiling current master branch of libfreenect

The first problem is that in platform/windows/unistd.h is preprocessor 'ifdef' statement that typedefs long as ssize_t. Despite I'm using MinGW SSIZE_T is not defined. My typedef of ssize_t is in _mingw.h with _SSIZE_T_DEFINED. I had to change this:

#ifndef _SSIZE_T_
#define _SSIZE_T_
typedef long ssize_t;
#endif // _SSIZE_T_

to this:

#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
typedef long ssize_t;
#endif // _SSIZE_T_DEFINED

Another problem was in example program glview.c on lines 220, 225, 230 and 236. The compiler gave me errors that I can't assign a bool value to freenect_flag_value. Therefore an explicit conversion is needed, e.g.:

auto_exposure = (freenect_flag_value)!auto_exposure;

The last problem is in regview.c. There is already defined symbol ftime in some included header file. So I had to change the name of ftime to something like my_ftime

@piedar
Copy link
Contributor

piedar commented Jan 24, 2014

  • ssize_t - Same with VS 2012. Definitely will fix.

I'm running into quite a few more errors with VS 2012. This isn't really a priority issue, but I'll see what I can do.

@piedar piedar modified the milestones: v0.4.1, v0.4.0 Feb 3, 2014
@piedar piedar modified the milestones: v0.4.2, v0.4.1 Feb 27, 2014
@piedar
Copy link
Contributor

piedar commented Apr 29, 2014

#363 finally fixes ssize_t

@piedar piedar closed this as completed in 9a722e3 Apr 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants