Am Samstag, 6. August 2016 um 15:39:19, schrieb Guillaume Munch <g...@lyx.org>
> Le 06/08/2016 à 03:44, Enrico Forestieri a écrit :
> >
> > As already said, it should be the same, provided you have the necessary
> > tools and libraries. These can be found in the cygwin distribution with
> > package names such as mingw64-i686-hunspell, mingw64-i686-pkg-config,
> > mingw64-i686-qt5-base, mingw64-i686-qt5-svg, mingw64-i686-qt5-winextras.
> > I am sure that similar packages are also available for linux distributions.
> > Then, using autotools, you have only to specify --host=i686-w64-mingw32
> > on the configure invocation, which does not otherwise differ from the
> > way you call it for non-cross builds.
> 
> Thanks!
> 
> >
> > Unfortunately, this does not work. Although the manual states that the
> > -pthread option sets flags for both the preprocessor and linker, this
> > is not the case for me:
> >
> > i686-w64-mingw32-g++ -pthread -E -dM -x c++ /dev/null | grep THREADS
> >
> 
> So I installed mingw from the (non-cygwin) Windows installer (choices:
> "gcc 4.9.2", "posix") and I managed to compile a simple test file for
> call_once out of the box with the command line:
> i686-w64-mingw32-g++ -std=c++11 call_once.cpp
> 
> No need for the -pthread command line after all. I imagine there could
> be small differences with the cygwin distribution, but are you sure that
> you actually have the posix threads variant?
> 
> Guillaume
> 
> 
> call_once.cpp:
> 
> #include <mutex>
> static std::once_flag flag;
> int main() {
>    std::call_once(flag, [](){ return; });
>    return 0;
> }

Tried with mingw based on gcc 4.8.2, compiles too.

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to