mingw

Eclipse, cmake, Windows, MingW - What Makefile generator?

邮差的信 提交于 2021-02-07 14:14:07
问题 What's the difference on Windows with cmake and eclipse and MingW if I choose "Eclipse MingW Makefile" or "Eclipse Unix Makefile"? With the MingW one I always get an error with "sh.exe" (that vanishes if I re-hit "Configure"), with the Unix one I always have to specifiy windres manually because cmake can't find it. Does this make any difference for Eclipse or something else? Both generated Makefiles work with Eclipse and MingW and compile my project. What Makefile should I choose? And why?

How to achieve vector swizzling in C++?

[亡魂溺海] 提交于 2021-02-07 11:38:31
问题 struct vec2 { union { struct { float x, y; }; struct { float r, g; }; struct { float s, t; }; }; vec2() {} vec2(float a, float b) : x(a), y(b) {} }; struct vec3 { union { struct { float x, y, z; }; struct { float r, g, b; }; struct { float s, t, p; }; // Here is the problem with g++. struct { vec2 xy; float z; }; struct { float x; vec2 yz; }; }; vec3() {} vec3(float a, float b, float c) : x(a), y(b), z(c) {} }; The code above compiles and works as expected in Visual Studio and so I can use it

Import MinGW compiler in Visual Studio 2017

喜夏-厌秋 提交于 2021-02-07 09:57:53
问题 Halo to the community, I have created a WIN32 C++ Solution-project in Visual Studio 2017. I want the files of the WIN32 application to be compiled by the MinGW compiler and then be able to debug the application using Visual Studio 2017. I am trying to follow this tutorial in order to import the MinGw compiler. I understand that this tutorial is referring to the MinGW-w64 project but I want to import the MinGW compiler found here. Can you please help me make the right associations in the

Import MinGW compiler in Visual Studio 2017

て烟熏妆下的殇ゞ 提交于 2021-02-07 09:57:05
问题 Halo to the community, I have created a WIN32 C++ Solution-project in Visual Studio 2017. I want the files of the WIN32 application to be compiled by the MinGW compiler and then be able to debug the application using Visual Studio 2017. I am trying to follow this tutorial in order to import the MinGw compiler. I understand that this tutorial is referring to the MinGW-w64 project but I want to import the MinGW compiler found here. Can you please help me make the right associations in the

Fixed size integers with gmp…?

天涯浪子 提交于 2021-02-07 08:50:37
问题 I've been trying for days to install GMP library under MINGW. I have been using for weeks __uint128_t with gcc under a linux64 bit environment, then ported the same program under GMP and mingw (32 bit version). I used mpz_class integers instead of __uint128_t . Then I started my new program and...! With __uint128_t and 64 bit it takes 16 minutes to complete, with GMP and MINGW it takes 91 HOURS!!! What should I do to speed up things a bit? Is there any faster way to do 128 bit integer math

Fixed size integers with gmp…?

坚强是说给别人听的谎言 提交于 2021-02-07 08:49:23
问题 I've been trying for days to install GMP library under MINGW. I have been using for weeks __uint128_t with gcc under a linux64 bit environment, then ported the same program under GMP and mingw (32 bit version). I used mpz_class integers instead of __uint128_t . Then I started my new program and...! With __uint128_t and 64 bit it takes 16 minutes to complete, with GMP and MINGW it takes 91 HOURS!!! What should I do to speed up things a bit? Is there any faster way to do 128 bit integer math

MinGW's ld cannot perform PE operations on non PE output file

喜你入骨 提交于 2021-02-07 08:08:44
问题 I know there are some other similar questions about this out there, be it StackOverflow or not. I've researched a lot for this, and still didn't find a single solution. I'm doing an operative system as a side project. I've been doing all in Assembly, but now I wanna join C code. To test, I made this assembly code file (called test.asm): [BITS 32] GLOBAL _a SECTION .text _a: jmp $ Then I made this C file (called main.c): extern void a(void); int main(void) { a(); } To link, I used this file

MinGW's ld cannot perform PE operations on non PE output file

喜你入骨 提交于 2021-02-07 08:06:17
问题 I know there are some other similar questions about this out there, be it StackOverflow or not. I've researched a lot for this, and still didn't find a single solution. I'm doing an operative system as a side project. I've been doing all in Assembly, but now I wanna join C code. To test, I made this assembly code file (called test.asm): [BITS 32] GLOBAL _a SECTION .text _a: jmp $ Then I made this C file (called main.c): extern void a(void); int main(void) { a(); } To link, I used this file

mingw 3.4.5 missing dlfcn.h?

我的未来我决定 提交于 2021-02-07 05:27:24
问题 is it possible that my mingw 3.4.5 installation is faulty? or is this provided on some other library floating around? in case you are wondering, dlfcn.h is where stuff like dlopen and dlclose are defined, so it should be pretty standard 回答1: It's not in my MinGW 3.4.5 installation, so I doubt your installation is faulty. I suppose the the MinGW maintainers expect you to use the Win32 functions supporting dynamic loading ( LoadLibrary() , GetProcAddress() , etc.). 回答2: dlfcn-win32 is a wrapper

Install Protocol Buffers on Windows

拈花ヽ惹草 提交于 2021-02-05 19:40:43
问题 I am unable to find clear instructions to install Google Protocol Buffers (including compiler) on Windows x64 platform. I went through the instructions README file for compiler and source: For Compiler: To install, simply place this binary somewhere in your PATH I added system variable to Path: PROTOC 'C:\dev_tools\protoc-2.4.1-win32' I am stuck on installing Protocol Buffers source using Cygwin. I tried following Unix instructions provided in the readme file: To build and install the C++