Instead of having a headache with MinGW, Cigwin and others I am trying to use the new Windows 10 feature (in beta) which allows to execute Linux stuff under windows. Seeing that make may be confused I am executing the following command line: make OSNAME=WINNT. However I am getting the errors that I am pasting below. It looks like it does not see windows definitions.
blas_server_win32.c:47:3: error: unknown type name ‘CRITICAL_SECTION’
CRITICAL_SECTION lock;
^
blas_server_win32.c:48:3: error: unknown type name ‘HANDLE’
HANDLE filled;
^
blas_server_win32.c:49:3: error: unknown type name ‘HANDLE’
HANDLE killed;
^
blas_server_win32.c:63:1: error: unknown type name ‘HANDLE’
static HANDLE blas_threads [MAX_CPU_NUMBER];
^
blas_server_win32.c:64:1: error: unknown type name ‘DWORD’
static DWORD blas_threads_id[MAX_CPU_NUMBER];
^
blas_server_win32.c:155:1: error: unknown type name ‘DWORD’
static DWORD WINAPI blas_thread_server(void *arg){
^
blas_server_win32.c:155:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘blas_thread_server’
static DWORD WINAPI blas_thread_server(void *arg){
^
blas_server_win32.c: In function ‘blas_thread_init’:
blas_server_win32.c:303:3: warning: passing argument 1 of ‘pthread_mutex_lock’ from incompatible pointer type [enabled by default]
LOCK_COMMAND(&server_lock);
^
parameter.c: In function ‘blas_set_parameter’:
parameter.c:255:7: warning: unused variable ‘size’ [-Wunused-variable]
int size = 16;
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:773:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
^
blas_server_win32.c:312:5: warning: implicit declaration of function ‘InitializeCriticalSection’ [-Wimplicit-function-declaration]
InitializeCriticalSection(&pool.lock);
^
blas_server_win32.c:313:5: warning: implicit declaration of function ‘CreateEvent’ [-Wimplicit-function-declaration]
pool.filled = CreateEvent(NULL, FALSE, FALSE, NULL);
^
blas_server_win32.c:313:37: error: ‘FALSE’ undeclared (first use in this function)
pool.filled = CreateEvent(NULL, FALSE, FALSE, NULL);
^
blas_server_win32.c:313:37: note: each undeclared identifier is reported only once for each function it appears in
blas_server_win32.c:314:37: error: ‘TRUE’ undeclared (first use in this function)
pool.killed = CreateEvent(NULL, TRUE, FALSE, NULL);
^
blas_server_win32.c:320:7: warning: implicit declaration of function ‘CreateThread’ [-Wimplicit-function-declaration]
blas_threads[i] = CreateThread(NULL, 0,
^
blas_server_win32.c:321:10: error: ‘blas_thread_server’ undeclared (first use in this function)
blas_thread_server, (void *)i,
^
blas_server_win32.c:328:3: warning: passing argument 1 of ‘pthread_mutex_unlock’ from incompatible pointer type [enabled by default]
UNLOCK_COMMAND(&server_lock);
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:784:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
^
blas_server_win32.c: In function ‘exec_blas_async’:
blas_server_win32.c:349:13: error: ‘blas_queue_t’ has no member named ‘finish’
current -> finish = CreateEvent(NULL, FALSE, FALSE, NULL);
^
blas_server_win32.c:349:43: error: ‘FALSE’ undeclared (first use in this function)
current -> finish = CreateEvent(NULL, FALSE, FALSE, NULL);
^
blas_server_win32.c:361:3: warning: implicit declaration of function ‘EnterCriticalSection’ [-Wimplicit-function-declaration]
EnterCriticalSection(&pool.lock);
^
blas_server_win32.c:371:3: warning: implicit declaration of function ‘LeaveCriticalSection’ [-Wimplicit-function-declaration]
LeaveCriticalSection(&pool.lock);
^
blas_server_win32.c:373:3: warning: implicit declaration of function ‘SetEvent’ [-Wimplicit-function-declaration]
SetEvent(pool.filled);
^
blas_server_win32.c: In function ‘exec_blas_async_wait’:
blas_server_win32.c:389:7: warning: implicit declaration of function ‘WaitForSingleObject’ [-Wimplicit-function-declaration]
WaitForSingleObject(queue->finish, INFINITE);
^
blas_server_win32.c:389:32: error: ‘blas_queue_t’ has no member named ‘finish’
WaitForSingleObject(queue->finish, INFINITE);
^
blas_server_win32.c:389:42: error: ‘INFINITE’ undeclared (first use in this function)
WaitForSingleObject(queue->finish, INFINITE);
^
blas_server_win32.c:391:7: warning: implicit declaration of function ‘CloseHandle’ [-Wimplicit-function-declaration]
CloseHandle(queue->finish);
^
blas_server_win32.c:391:24: error: ‘blas_queue_t’ has no member named ‘finish’
CloseHandle(queue->finish);
^
blas_server_win32.c:392:7: warning: implicit declaration of function ‘DeleteCriticalSection’ [-Wimplicit-function-declaration]
DeleteCriticalSection(&queue -> lock);
^
blas_server_win32.c: In function ‘blas_thread_shutdown_’:
blas_server_win32.c:439:3: warning: passing argument 1 of ‘pthread_mutex_lock’ from incompatible pointer type [enabled by default]
LOCK_COMMAND(&server_lock);
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:773:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
^
blas_server_win32.c:447:3: warning: implicit declaration of function ‘TerminateThread’ [-Wimplicit-function-declaration]
TerminateThread(blas_threads[i],0);
^
blas_server_win32.c:453:3: warning: passing argument 1 of ‘pthread_mutex_unlock’ from incompatible pointer type [enabled by default]
UNLOCK_COMMAND(&server_lock);
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:784:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
^
blas_server_win32.c: In function ‘goto_set_num_threads’:
blas_server_win32.c:468:3: warning: passing argument 1 of ‘pthread_mutex_lock’ from incompatible pointer type [enabled by default]
LOCK_COMMAND(&server_lock);
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:773:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
^
blas_server_win32.c:474:36: error: ‘FALSE’ undeclared (first use in this function)
pool.filled = CreateEvent(NULL, FALSE, FALSE, NULL);
^
blas_server_win32.c:475:36: error: ‘TRUE’ undeclared (first use in this function)
pool.killed = CreateEvent(NULL, TRUE, FALSE, NULL);
^
blas_server_win32.c:485:10: error: ‘blas_thread_server’ undeclared (first use in this function)
blas_thread_server, (void *)i,
^
blas_server_win32.c:491:3: warning: passing argument 1 of ‘pthread_mutex_unlock’ from incompatible pointer type [enabled by default]
UNLOCK_COMMAND(&server_lock);
^
In file included from ../../common.h:129:0,
from blas_server_win32.c:41:
/usr/include/pthread.h:784:12: note: expected ‘union pthread_mutex_t *’ but argument is of type ‘BLASULONG *’
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
^
make[1]: *** [blas_server.obj] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/mnt/c/mingw/msys/home/benjz/openblas/driver/others'
make: *** [libs] Error 1
Thanks in advance.