mingw-w64

CMake 3.8.0 generates wrong link command in makefiles

为君一笑 提交于 2019-12-04 17:29:20
Problem: After I run cmake to generate a project with a STATIC library, which completes successfully, both ninja and mingw32-make fail to make their targets at linking. For SHARED libraries or executables this same setup worked fine. I've tried this both for "Ninja" and "MinGW Makefiles" generators: ninja output: [2/2] Linking CXX static library hello_wsl.lib FAILED: hello_wsl.lib cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E remove hello_wsl.lib && "" qc hello_wsl.lib CMakeFiles/hello_wsl.dir/lib_hello_world.cpp.obj && cd ." """" no se reconoce como un comando interno o

std::thread, posix threads, and win32 threads in MinGW-W64

◇◆丶佛笑我妖孽 提交于 2019-12-04 17:11:56
I'm using MinGW_W64, and I'm having trouble deciding how to move forward with the "threading" option. I can use either posix threads, or win32 threads. So far I've been using C++11's "std::thread" for my threading (which requires the posix threads option), and I really like the interface doing things this way. However, I've read from multiple sources that posix threads are significantly slower than win32 threads, and performance is a big concern for me. My project will eventually be multi-platform, but for now my primary development machine is running Windows 7. My question is: Are MinGW_W64's

Differences between Mingw-w64 and TDM-GCC for a simple GDI project

强颜欢笑 提交于 2019-12-04 12:12:35
问题 I need to build a simple non-commercial tool (dealing with Windows GDI API) on Win64 for Win64 (no cross compilation). MinGW seems the best option for me. I have already used the 32 bit version in the past, as for 64-bit, can you tell me the main differences between the following builds?: Mingw-w64 TDM-GCC Besides the classic MinGW32 used a straightforward tool, mingw-get.exe , to customise the setup and keep up with the updating cycle. Which is the equivalent now? 回答1: I've posted a short

Sorry, unimplemented: 64 bit mode not compiled in

两盒软妹~` 提交于 2019-12-04 10:56:37
问题 This is what I'm trying to do(on Windows 7 64-bits): g++ -m64 -o main main.cpp And the error I get is: Sorry, unimplemented: 64 bit mode not compiled in ... I installed mingw-64-install.exe from here: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/ But I still get the same error. Do I also need to add the path to this folder in the environment variable? Thanks EDIT: This is what I get when I type g++ -v Using built-in

CMake failing to statically link SDL2

◇◆丶佛笑我妖孽 提交于 2019-12-04 10:12:42
I'm trying to build a simple SDL2 game with CMake and MSYS Makefiles. I want to statically link SDL2 so I can distribute a single executable without having to include the SDL2.dll. Here's my CMakeLists.txt file: project(racer-sdl) cmake_minimum_required(VERSION 2.8) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_EXE_LINKER_FLAGS "-static") include(FindPkgConfig) pkg_search_module(SDL2 sdl2) if (SDL2_FOUND) message(STATUS "Using SDL2") add_definitions(-DUSE_SDL2) include_directories(${SDL2_INCLUDE_DIRS}) link_directories(${SDL2_LIBRARY_DIRS}) link_libraries(${SDL2_LIBRARIES})

The procedure entry point __gxx_personality_sj0 could not be located in…

一笑奈何 提交于 2019-12-04 09:02:47
问题 I have managed to (somehow) cross-compile Qt5 with the Mingw-w64 Project's compiler for 32-bit Windows. All of the libraries have been installed to ~/i686-w64-mingw32 . I have a CMake-based Qt project that I am trying to cross-compile. By following these instructions, I have been able to get the project to compile. So far so good. Unfortunately, when executing the resulting binary on Windows, I end up getting an error: "The procedure entry point __gxx_personality_sj0 could not be located in

Python 3.4: compile cython module for 64-bit windows

隐身守侯 提交于 2019-12-04 08:34:39
问题 I have a .pyx module that I've been trying to compile for use with 64-bit python 3.4 on Windows through various means but with no success. After a lot of trial and error, it does compile with python setup.py build_ext --inplace --compiler=mingw32 but of course, that won't work with 64-bit python. With msvc as the compiler, the error is File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: ['path'] Windows 7

MinGW64 Is Incapable of 32 Byte Stack Alignment (Required for AVX on Windows x64), Easy Work Around or Switch Compilers?

瘦欲@ 提交于 2019-12-04 08:20:52
I'm trying to work with AVX instructions and windows 64bit. I'm comfortable with g++ compiler so I've been using that, however, there is a big bug described reported here and very rough solutions were presented here . Basically, m256 variable can't be aligned on the stack to work properly with avx instructions, it needs 32 byte alignment. The solutions presented at the other stack question I linked are really terrible, especially if you have performance in mind. A python program that you would have to run every time you want to debug that replaces instructions with their sub-optimal unaligned

How to change HOME directory and start directory on MSYS2?

一笑奈何 提交于 2019-12-04 01:36:38
I have installed MinGW-w64 and MSYS2. But how do I change the HOME directory in MSYS2? So that when I type cd $home or cd ~ it goes to another directory that I defined. And how do I write a code so that the starting directory is always where the .bat file is placed on? In cmd I used this code: %~d1 cd "%~p1" call cmd so when I open cmd on my desktop, it starts from the directory on desktop. How can I do a similar thing with msys2? dr ganjoo If you would like to use your windows home folder as the home folder for MSYS2, you can edit /etc/nsswitch.conf and write: db_home: windows Msys2 will use

MinGW64 cannot compile 32bit code

為{幸葍}努か 提交于 2019-12-03 21:00:55
I've downloaded MinGW from this link x64-4.8.1-posix-sjlj-rev1 but when I try to build for x86 target I've lots of linkage errors... seems that only x64 lib are installed... I've need to build for x86 and x64 platforms on windows... Have I to download both x64 and x86 or are some simpler ways? Edit I'm using eclipse keplero as IDE I've tryed to build myself a simple hello world program with g++ -m32 -std=c++11 test.cpp -o test32.exe and g++ -m64 -std=c++11 test.cpp -o test64.exe . And all is ok... So the problem was with eclipse... After a little a discovered that I need to use MYSY ( set in