Segfault with asio standalone when classes in separate files

后端 未结 3 453
死守一世寂寞
死守一世寂寞 2020-12-31 04:39

The below is as minimal of an example as I can get. It does need to be in separate files as that seems to be what causes the segmentation fault error.

I\'m using Min

3条回答
  •  独厮守ぢ
    2020-12-31 05:31

    I had similar problem. My app crashed on win_lock::lock(), but win_lock::win_lock() constructor was never called!

    When added -D_POSIX_THREADS to compiler flags it simply started to work.

    I use mingw-w64-i686-7.1.0-posix-dwarf-rt_v5-rev0 on win7

提交回复
热议问题