jeudi 3 novembre 2016

C++ Boost and Cygwin64 error

I am trying to make a simple program using header only interprocess library. However trying to include the headers

#define BOOST_DATE_TIME_NO_LIB
#include <boost/interprocess/file_mapping.hpp>
#include <boost/interprocess/mapped_region.hpp>
#include <boost/filesystem.hpp>

gives me errors listed below. I am not familiar with Boost. Is there some macro I need to define to resolve the issue? Also trying to compile with VS2015 fails, as despite the BOOST_DATE_TIME_NO_LIB linker demands date lib.

||=== Build: Release in CB_Tests (compiler: Cygwin GCC) ===|
boost\interprocess\detail\win32_api.hpp||In function 'long int boost::interprocess::winapi::interlocked_increment(volatile long int*)':|
boost\interprocess\detail\win32_api.hpp|1414|error: no matching function for call to '_InterlockedIncrement(long int*)'|
\usr\include\w32api\winbase.h|2937|note: candidate: long unsigned int _InterlockedIncrement(volatile long unsigned int*) <near match>|
\usr\include\w32api\winbase.h|2937|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1414|error: invalid conversion from 'long int*' to 'volatile long unsigned int*' [-fpermissive]|
\usr\include\w32api\winbase.h|2946|note: candidate: long long unsigned int _InterlockedIncrement(volatile long long unsigned int*) <near match>|
\usr\include\w32api\winbase.h|2946|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1414|error: invalid conversion from 'long int*' to 'volatile long long unsigned int*' [-fpermissive]|
boost\interprocess\detail\win32_api.hpp||In function 'long int boost::interprocess::winapi::interlocked_decrement(volatile long int*)':|
boost\interprocess\detail\win32_api.hpp|1417|error: no matching function for call to '_InterlockedDecrement(long int*)'|
\usr\include\w32api\winbase.h|2955|note: candidate: long unsigned int _InterlockedDecrement(volatile long unsigned int*) <near match>|
\usr\include\w32api\winbase.h|2955|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1417|error: invalid conversion from 'long int*' to 'volatile long unsigned int*' [-fpermissive]|
\usr\include\w32api\winbase.h|2964|note: candidate: long long unsigned int _InterlockedDecrement(volatile long long unsigned int*) <near match>|
\usr\include\w32api\winbase.h|2964|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1417|error: invalid conversion from 'long int*' to 'volatile long long unsigned int*' [-fpermissive]|
boost\interprocess\detail\win32_api.hpp||In function 'long int boost::interprocess::winapi::interlocked_compare_exchange(volatile long int*, long int, long int)':|
boost\interprocess\detail\win32_api.hpp|1420|error: no matching function for call to '_InterlockedCompareExchange(long int*, long int&, long int&)'|
\usr\include\w32api\winbase.h|3025|note: candidate: long unsigned int _InterlockedCompareExchange(volatile long unsigned int*, long unsigned int, long unsigned int) <near match>|
\usr\include\w32api\winbase.h|3025|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1420|error: invalid conversion from 'long int*' to 'volatile long unsigned int*' [-fpermissive]|
\usr\include\w32api\winbase.h|3034|note: candidate: long long unsigned int _InterlockedCompareExchange(volatile long long unsigned int*, long long unsigned int, long long unsigned int) <near match>|
\usr\include\w32api\winbase.h|3034|note:   conversion of argument 1 would be ill-formed:|
boost\interprocess\detail\win32_api.hpp|1420|error: invalid conversion from 'long int*' to 'volatile long long unsigned int*' [-fpermissive]|
boost\interprocess\detail\win32_api.hpp||In function 'long int boost::interprocess::winapi::interlocked_exchange_add(volatile long int*, long int)':|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1423|error: no matching function for call to '_InterlockedExchangeAdd(long int*, long int&)'|
\usr\include\w32api\winbase.h|2995|note: candidate: long unsigned int _InterlockedExchangeAdd(volatile long unsigned int*, long unsigned int) <near match>|
\usr\include\w32api\winbase.h|2995|note:   conversion of argument 1 would be ill-formed:|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1423|error: invalid conversion from 'long int*' to 'volatile long unsigned int*' [-fpermissive]|
\usr\include\w32api\winbase.h|3012|note: candidate: long long unsigned int _InterlockedExchangeAdd(volatile long long unsigned int*, long long unsigned int) <near match>|
\usr\include\w32api\winbase.h|3012|note:   conversion of argument 1 would be ill-formed:|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1423|error: invalid conversion from 'long int*' to 'volatile long long unsigned int*' [-fpermissive]|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp||In function 'long int boost::interprocess::winapi::interlocked_exchange(volatile long int*, long int)':|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1426|error: no matching function for call to '_InterlockedExchange(long int*, long int&)'|
\usr\include\w32api\winbase.h|2973|note: candidate: long unsigned int _InterlockedExchange(volatile long unsigned int*, long unsigned int) <near match>|
\usr\include\w32api\winbase.h|2973|note:   conversion of argument 1 would be ill-formed:|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1426|error: invalid conversion from 'long int*' to 'volatile long unsigned int*' [-fpermissive]|
\usr\include\w32api\winbase.h|2982|note: candidate: long long unsigned int _InterlockedExchange(volatile long long unsigned int*, long long unsigned int) <near match>|
\usr\include\w32api\winbase.h|2982|note:   conversion of argument 1 would be ill-formed:|
C:\Boost\boost_1_62_0\boost\interprocess\detail\win32_api.hpp|1426|error: invalid conversion from 'long int*' to 'volatile long long unsigned int*' [-fpermissive]|
C:\Boost\boost_1_62_0\boost\interprocess\detail\os_thread_functions.hpp||In function 'int boost::interprocess::ipcdetail::thread_create(boost::interprocess::ipcdetail::OS_thread_t*, unsigned int (*)(void*), void*)':|
C:\Boost\boost_1_62_0\boost\interprocess\detail\os_thread_functions.hpp|507|error: '_beginthreadex' was not declared in this scope|
||=== Build failed: 16 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|

Aucun commentaire:

Enregistrer un commentaire