mingw

Why doesn't my compiler recognize #include <thread> (c++)?

こ雲淡風輕ζ 提交于 2021-01-28 01:51:19
问题 I wrote this as a simplified version of a multithreading example to get a feel for it, but am running into some issues when compiling. My compiler says that thread is not a member of std and prompts me to add #include <thread> to my code even though I have already done so. I've been unable to find any similar problems so far, but I suspect that it is an issue with how I'm compiling it because my code is very similar to the example code. #include <iostream> #include <thread> void doWork () {

C++ Qt MingW bad reloc 0xc address in section rdata

扶醉桌前 提交于 2021-01-28 00:51:50
问题 I'm with Qt 5.5 on Windows 10 64 bit with MingW compiler. I'm trying to compile my project in debug mode => Works perfectly But in release mode, I have these errors: undefined reference to `TileMap::XYToNode(int, int) const' undefined reference to `TileMap::XYToNode(int, int) const' ./release\perso.o: bad reloc address 0xc in section `.rdata' collect2.exe:-1: erreur : error: ld returned 1 exit status I have tried to do clean, qmake, and rebuild, but there are still errors. I use some SFML

CMake: find wxWidgets built with MinGW/MSYS?

空扰寡人 提交于 2021-01-28 00:01:08
问题 I compiled wxWidgets 2.8.12 using MinGW. To actually do the build I invoked the autotools build files distributed with wxWidgets through the MSYS shell, using an install prefix of H:\MinGW-libs. The result of this is that I have a Unix style file tree containing my wxWidgets headers and libs (which are .a files, not .dll) with root directory H:\MinGW-libs. My problem is that I can't get CMake to find the files. When I try to use the "configure" button in the CMake gui it finds other

manually link standard library in MinGW

≯℡__Kan透↙ 提交于 2021-01-27 20:34:49
问题 I had some trouble getting MinGW to recognise libraries for CSFML. I've had to manually link each library using the linker. Now I dont have the standard library that gets linked automatically from a simple gcc call. bbroo@DESKTOP-1F1J3SM ~/Shaders $ ld shaders.o libcsfml-system.a libcsfml-window.a libcsfml-graphics.a csfml-system-2.dll csfml-window-2.dll csfml-graphics-2.dll shaders.o:shaders.c:(.text+0x10): undefined reference to `__main' shaders.o:shaders.c:(.text+0x4bc): undefined

\mingw-w64\ … \ld.exe: cannot find -lboost_filesystem

感情迁移 提交于 2021-01-27 17:32:23
问题 I'm trying to compile simple c++ program with mingw on "windows 7 64bit" command prompt. Error I get is: >gcc fs.cpp -lboost_filesystem -lboost_system c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lboost_filesystem c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find

MinGW: Linking with -nostdlib produces invalid executable

≡放荡痞女 提交于 2021-01-27 16:42:29
问题 I've spent the last couple of hours trying to link a simple x86 assembly program without any of the CRT initialization code using MinGW. I want the executable to only contain the _main method listed below and a single import of the ExitProcess kernel function. Opening the various generated files in a disassembler reveals that _main is indeed the entry point and the import table contains an import of ExitProcess (without the name decorations) from KERNEL32.dll , however Windows won't load the

MinGW: Linking with -nostdlib produces invalid executable

白昼怎懂夜的黑 提交于 2021-01-27 16:35:52
问题 I've spent the last couple of hours trying to link a simple x86 assembly program without any of the CRT initialization code using MinGW. I want the executable to only contain the _main method listed below and a single import of the ExitProcess kernel function. Opening the various generated files in a disassembler reveals that _main is indeed the entry point and the import table contains an import of ExitProcess (without the name decorations) from KERNEL32.dll , however Windows won't load the

msvcrt alternative for MinGW? (e.g. to get conforming snprintf)

南笙酒味 提交于 2021-01-27 12:52:47
问题 So here's a fun one... we have a few C libraries which should be platform independent, even though they were developed on linux, because they only rely on the c standard library as defined in ISO/IEC 9899:1999. When we compiled those libraries with MinGW everything seemed to work fine at first, but today we found out that the snprintf() implementation of msvcrt is braindea... sorry, i meant " incompatible " with the definition in the C99 standard. I would have expected a warning from MinGW,

C DLL In Code::Blocks

房东的猫 提交于 2021-01-27 12:36:30
问题 I can't find anything about how to make a C DLL in Code::Blocks. Whenever I try and look it up it shows links to using C++ DLLs in managed programming languages. And Code::Blocks doesn't give an option for a C DLL. What do I do? 回答1: File->New->Project to show this dialog: Then select Dynamic Link Library and away you go. 回答2: In Code::Blocks you create a new project, then select Dynamic Link Library (note: you can also, more easily create a Static Link Library, which is also available) and

Haskell学习笔记(一) 安装

不想你离开。 提交于 2021-01-27 02:55:48
官网地址:https://www.haskell.org/downloads/ 1.在 官网 下载安装包。这里我直接下载的Haskell Platform安装包。有的教程推荐下载stack再进行后续安装,原因是platform版本之间存在一些不稳定的情况。但是下载platform是一种比较轻松省事的安装方式。(顺便祈祷不要出现不稳定的bug) 2.双击运行安装包,路径最好就不要改了,或者要好记一点。 在安装过程中会出现stack安装的弹窗 3.安装完毕之后,打开命令行输入 cabal user-config init ,会出现默认的放置配置文件的地址,然后到那个文件夹下修改config文件。 检查文件中是否有以下语句   extra-prog-path: 文件安装路径\msys\usr\bin   extra-lib-dirs: 文件安装路径\mingw\lib   extra-include-dirs: 文件安装路径\mingw\include 如果没有,在文件结尾加上。另外,以上三个路径可以存在由逗号隔开的多个地址。保存并关闭config文件。 4.打开开始菜单,可以看到GHCi和WinGHCi。GHCi是Haskell的解释器,使用类似于Python的shell或者MATLAB的命令行,输入算式敲回车就能进行计算。但是如果要进行复杂运算就需要编写程序、编译运行了