Building for a Windows target
Hello,
I have tried to create an executable that have to run over a Windows platform. I have used PolyORB-HI-C
The first time I tried to build it some messages appeared warning about missing mingw packets. I have installed these packets:
p binutils-mingw-w64 - Cross-binutils for Win32 and Win64 using MinGW-w64
i A binutils-mingw-w64-i686 - Cross-binutils for Win32 (x86) using MinGW-w64
i A binutils-mingw-w64-x86-64 - Cross-binutils for Win64 (x64) using MinGW-w64
i g++-mingw-w64 - GNU C++ compiler for MinGW-w64
i A g++-mingw-w64-i686 - GNU C++ compiler for MinGW-w64 targeting Win32
i A g++-mingw-w64-x86-64 - GNU C++ compiler for MinGW-w64 targeting Win64
p gcc-mingw-w64 - GNU C compiler for MinGW-w64
i A gcc-mingw-w64-base - GNU Compiler Collection for MinGW-w64 (base package)
i A gcc-mingw-w64-i686 - GNU C compiler for MinGW-w64 targeting Win32
i A gcc-mingw-w64-x86-64 - GNU C compiler for MinGW-w64 targeting Win64
p gdb-mingw-w64 - Cross-debugger for Win32 and Win64 using MinGW-w64
p gdb-mingw-w64-target - Cross-debugger server for Win32 and Win64 using MinGW-w64
p gfortran-mingw-w64 - GNU Fortran compiler for MinGW-w64
p gfortran-mingw-w64-i686 - GNU Fortran compiler for MinGW-w64 targeting Win32
p gfortran-mingw-w64-x86-64 - GNU Fortran compiler for MinGW-w64 targeting Win64
p gnat-mingw-w64 - GNU Ada compiler for MinGW-w64
p gnat-mingw-w64-base - GNU Ada compiler for MinGW-w64 (base package)
p gnat-mingw-w64-i686 - GNU Ada compiler for MinGW-w64 targeting Win32
p gnat-mingw-w64-x86-64 - GNU Ada compiler for MinGW-w64 targeting Win64
p gobjc++-mingw-w64 - GNU Objective-C++ compiler for MinGW-w64
p gobjc++-mingw-w64-i686 - GNU Objective-C++ compiler for MinGW-w64 targeting Win32
p gobjc++-mingw-w64-x86-64 - GNU Objective-C++ compiler for MinGW-w64 targeting Win64
p gobjc-mingw-w64 - GNU Objective-C compiler for MinGW-w64
p gobjc-mingw-w64-i686 - GNU Objective-C compiler for MinGW-w64 targeting Win32
p gobjc-mingw-w64-x86-64 - GNU Objective-C compiler for MinGW-w64 targeting Win64
p mingw-ocaml - ocaml-mingw-w64 transitional dummy package
p mingw-w64 - Development environment targeting 32- and 64-bit Windows
i A mingw-w64-common - Common files for Mingw-w64
i A mingw-w64-i686-dev - Development files for MinGW-w64 targeting Win32
p mingw-w64-tools - Development tools for 32- and 64-bit Windows
i A mingw-w64-x86-64-dev - Development files for MinGW-w64 targeting Win64
i mingw32 - Minimalist GNU win32 (cross) compiler (transition package)
i A mingw32-binutils - Minimalist GNU win32 (cross) binutils (transition package)
p ocaml-mingw-w64 - OCaml cross-compiler based on mingw -- Meta-package
p ocaml-mingw-w64-i686 - OCaml cross-compiler based on mingw -- 32 bit compiler
v pkg-config-mingw-w64-i686 -
v pkg-config-mingw-w64-x86-64 -
Afterwards I get this error messages when compiling:
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_task.c:387:31: warning: passing argument 3 of 'CreateThread' from incompatible pointer type
h = CreateThread (NULL, 0, start_routine, NULL, 0, &tid);
^
In file included from /usr/share/mingw-w64/include/winbase.h:29:0,
from /usr/share/mingw-w64/include/windows.h:70,
from /home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_task.c:18:
/usr/share/mingw-w64/include/processthreadsapi.h:84:28: note: expected 'LPTHREAD_START_ROUTINE' but argument is of type 'void * (*)(void)'
WINBASEAPI HANDLE WINAPI CreateThread (LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
^
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c: In function '__po_hi_instrumentation_vcd_init':
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c:131:62: error: 'O_SYNC' undeclared (first use in this function)
__po_hi_vcd_file = open ("bench.vcd", O_WRONLY|O_CREAT|O_SYNC, S_IRUSR|S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
^
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c:131:62: note: each undeclared identifier is reported only once for each function it appears in
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c:131:88: error: 'S_IRGRP' undeclared (first use in this function)
__po_hi_vcd_file = open ("bench.vcd", O_WRONLY|O_CREAT|O_SYNC, S_IRUSR|S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
^
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c:131:98: error: 'S_IWGRP' undeclared (first use in this function)
__po_hi_vcd_file = open ("bench.vcd", O_WRONLY|O_CREAT|O_SYNC, S_IRUSR|S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
^
/home/assert/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_utils.c:131:108: error: 'S_IROTH' undeclared (first use in this function)
__po_hi_vcd_file = open ("bench.vcd", O_WRONLY|O_CREAT|O_SYNC, S_IRUSR|S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
Can you tell me if it is possible to create executables for a Windows platform?
Thanks Regards