#ifdef _WIN32 in x64 compilation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

#ifdef _WIN32 in x64 compilation

jmarkham
I'm compiling 1.4 and there's several places (MMCore/Logging/Metadata.h, MMDevice/DeviceThreads.h) where #ifdef _WIN32 is used to decide whether or not to use UNIX threads. When compiling for x64 it is not defined and so the compilation breaks. Removing the thread stuff fixes it but presumably this is not how it's meant to be. Am I doing something wrong?

Ta,

John 


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: #ifdef _WIN32 in x64 compilation

Stuurman, Nico
On 1/16/19 6:14 AM, John Markham wrote:
> I'm compiling 1.4 and there's several places
> (MMCore/Logging/Metadata.h, MMDevice/DeviceThreads.h) where #ifdef
> _WIN32 is used to decide whether or not to use UNIX threads. When
> compiling for x64 it is not defined and so the compilation breaks.
> Removing the thread stuff fixes it but presumably this is not how it's
> meant to be. Am I doing something wrong?

Are you on Windows?  _WIN32 should be defined even for x64 compilation. 
See:
https://stackoverflow.com/questions/6679396/should-i-define-both-win32-and-win64-in-64bit-build

Also, this is how we build the code on x64. I suspect that something in
your build environment is not correct if you are on Windows and _WIN32
is not defined.


Best,

Nico




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general