mingw32

Linking SDL2 and Clion

时光怂恿深爱的人放手 提交于 2019-12-31 01:46:21
问题 I have clion pointing to SDL2 directories and libs, but it fails to link the libraries when I try to build. Any ideas on how to fix this? CMakeLists: cmake_minimum_required(VERSION 3.3) project(cavestory_development) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -lSDL2") set(SDL2_INCLUDE_DIR C:/SDL2-2.0.3/i686-w64-mingw32/include/SDL2) set(SDL2_LIBRARY C:/SDL2-2.0.3/i686-w64-mingw32/lib) find_package(SDL2 REQUIRED) include_directories(${SDL2_INCLUDE_DIR}) set(SOURCE_FILES main.cpp) add

On windows _fseeki64 does not seek to SEEK_END correctly for large files

╄→尐↘猪︶ㄣ 提交于 2019-12-30 07:35:51
问题 I have reduced the problem to the following basic function which should simply print the number of bytes in the file. When I execute it for a file of 83886080 bytes (80 MB) it prints the correct number. However for a file of 4815060992 bytes (4.48 GB) it prints 520093696 which is way to low. It seems to have something to do with the SEEK_END option because if I set the pointer to 4815060992 bytes manually (e.g. _fseeki64(fp, (__int64)4815060992, SEEK_SET) _ftelli64 does return the correct

On windows _fseeki64 does not seek to SEEK_END correctly for large files

拟墨画扇 提交于 2019-12-30 07:35:28
问题 I have reduced the problem to the following basic function which should simply print the number of bytes in the file. When I execute it for a file of 83886080 bytes (80 MB) it prints the correct number. However for a file of 4815060992 bytes (4.48 GB) it prints 520093696 which is way to low. It seems to have something to do with the SEEK_END option because if I set the pointer to 4815060992 bytes manually (e.g. _fseeki64(fp, (__int64)4815060992, SEEK_SET) _ftelli64 does return the correct

How to compile on multiple cores using mingw inside QTCreator

天大地大妈咪最大 提交于 2019-12-30 02:48:09
问题 I have a quad-core i7 CPU on my windows desktop. I am trying to get mingw32-make to compile using as many core as possible. I have added -j8 into the "Make Arguments" fields under Build Settings->Build Steps. mingw32-make seems to completely ignore the option since I don't get any speed improvement out of that. When I view the CPU usage in task manager, it stays at 13% and I only see one instance of g++ running. Right now, rebuilding the whole project using mingw takes 3 full minutes.

Impossible constraint in 'asm': __asm__ __volatile__

心不动则不痛 提交于 2019-12-25 07:21:30
问题 I trying since a few days to write a very simple inline assembler code, but nothing worked. I have as IDE NetBeans and as compiler MinGW. My latest code is: uint16 readle_uint16(const uint8 * buffer, int offset) { unsigned char x, y, z; unsigned int PORTB; __asm__ __volatile__("\n" "addl r29,%0\n" "addl r30,%1\n" "addl r31,%2\n" "lpm\n" "out %3,r0\n" : "=I" (PORTB) : "r" (x), "r" (y), "r" (z) ); return value; } But I get everytime the same message "error: impossible constraint in 'asm'". I

gnuwin32 libxml2 installation : setting several lib and include directories

江枫思渺然 提交于 2019-12-25 01:53:24
问题 I am now compiling libxml2 on windows 8 using mingw32. I have downloaded from here ftp://xmlsoft.org/libxml2/ and follow the instruction found in the README file. They instruct to configure make using a javascript called configure.js. We can run the script like this: cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib debug=yes I guess there is a super simple and maybe obvious to this question, but how do I set several lib and include folders ? I tried

How to set pixels to “Console Windows” by passing “String Pointer” in C?

半腔热情 提交于 2019-12-24 19:10:00
问题 I know how to set pixels to "Console Windows" by using "SetPixel()" http://msdn.microsoft.com/en-us/library/windows/desktop/dd145078(v=vs.85).aspx But it wastes a lot of time to call this function and draw every pixels to it. Is there any feasible way to set every pixels by passing string (pointer), and call function one time, but set every pixels? 回答1: Not sure what you mean by "Console Windows" or "String", and what they have to do with SetPixel(). However it is true that modifying bitmaps

C++ Multiple Inheritance Memory Addressing issue

℡╲_俬逩灬. 提交于 2019-12-23 20:08:25
问题 Please ignore the #include parts assuming they are done correctly. Also this could be implementation specific (but so is the concept of vtables) but i am just curious as it enhances me to visualize multiple inheritance. (I'm using MinGW 4.4.0 by the way) initial code: class A { public: A() : a(0) {} int a; }; //Edit: adding this definition instead void f(void* ptrA) { std::cout<<((A*)ptrA)->a; } //end of editing of original posted code #if 0 //this was originally posted. Edited and replaced

Does mingw32-make be renamed to make?

坚强是说给别人听的谎言 提交于 2019-12-23 11:57:08
问题 I installed the latest mingw, and found there is no mingw32-make any more. There is make.exe, so I am wondering if mingw32-make is renamed to make.exe recently. 回答1: I don't know where you're getting MinGW from, but some distributions (like nuwen's) name it make.exe , and others name it mingw32-make.exe (or mingw32-make.exe ). I generally copy whichever one to the other, so I have identical mingw32-make.exe and make.exe in the bin directory. My understanding is the the name mingw32-make.exe

Linking project with statically build curl

泄露秘密 提交于 2019-12-23 10:57:05
问题 I'm doing small project in C++ with CMake and MinGW32, which requires libcurl library, but when i try to link statically build libcurl.a I get undefined reference errors undefined reference to `_imp__curl_easy_init' undefined reference to `_imp__curl_easy_setopt' undefined reference to `_imp__curl_easy_perform' undefined reference to `_imp__curl_easy_getinfo' undefined reference to `_imp__curl_easy_strerror' I have cURL source code in dep/curl and my source code in src folder. And this is how