puremvc-cpp-multicore-framework icon indicating copy to clipboard operation
puremvc-cpp-multicore-framework copied to clipboard

pureMVC-cpp-multicore can not build in Cygwin

Open lakezhong opened this issue 9 years ago • 2 comments

my solution is:

first solution: change PureMVC.cpp

from:

if defined(APPLE)

define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE

endif

to:

if defined(APPLE) || defined(CYGWIN)

define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE

endif

second solution: change PureMVC.cpp, int Mutex::Mutex(void)

from: ::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

to:

if defined(PTHREAD_MUTEX_RECURSIVE_NP)

::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

else

::pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);

endif

I don't know which is better.

lakezhong avatar May 25 '15 02:05 lakezhong

The first is less intrusive, I'd go with that. If you want to make a pull request, I'll accept it.

cliffhall avatar Jul 15 '15 16:07 cliffhall

read the HowToBuild.txt

heyxiaohao avatar Apr 06 '16 02:04 heyxiaohao