mingw

GLM on compile breeds a ton of errors

半腔热情 提交于 2020-01-06 19:46:12
问题 I include some GLM files into my code, and I receive a ton of errors (at least 90 of them). Why this is happening, I have no idea. I am using the latest GLM (0.9.3.3 at the time of this writing). I am also using Qt Creator on Windows, with a QMake file you'll see. I should also note that I ended up copying the glm folder to my include directory reciding in my mingw folder. What can I do to fix this? QMake CONFIG += console HEADERS += \ util.hpp \ ShaderComparable.hpp \ SearchTree.hpp \

Cygwin和MinGW有什么区别?

巧了我就是萌 提交于 2020-01-06 17:15:51
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我想让我的C ++项目跨平台,我正在考虑使用Cygwin / MinGW。 但它们之间有什么区别? 另一个问题是我是否能够在没有Cygwin / MinGW的系统上运行二进制文件? #1楼 维基百科说 : MinGW 从 Cygwin 1.3.3版本开始。 尽管 Cygwin 和 MinGW 都可用于将 UNIX 软件移植到 Windows ,但它们有不同的方法: Cygwin 旨在提供完整的 POSIX layer ,提供 Linux , UNIX 和 BSD 变体上存在的多个系统调用和库的模拟。 POSIX layer 在 Windows 之上运行,在必要时牺牲性能以实现兼容性。 因此,这种方法要求使用 Cygwin 编写的 Windows 程序在copylefted兼容库之上运行,该库必须与程序一起分发,以及程序的 source code 。 MinGW 旨在通过直接的 Windows API calls 提供本机功能和性能。 与 Cygwin 不同, MinGW 不需要兼容层 DLL ,因此程序不需要与 source code 一起分发。 由于 MinGW 依赖于 Windows API calls ,因此无法提供完整的 POSIX API ; 它无法编译可以使用 Cygwin 编译的一些 UNIX

Using Cspice with mingw

梦想的初衷 提交于 2020-01-06 07:21:09
问题 I am trying to use cspice with g++ for windows via mingw. Unfortunately cspice does not provide a library for mingw. The libraries are available at https://naif.jpl.nasa.gov/naif/toolkit_C.html. It gives undefined reference errors for the functions defined through cspice. It runs properly in Linux. Can anyone suggest a method to make it work. I run: g++ -LK:\Data\cspice\lib -IF:\CPP\Libraries\Boost\boost_1_68_0 -o foo foo.cpp -l:cspice.a -lm The errors I get are: undefined reference to

Qt Creator build with the MinGW toolchain is slowish

 ̄綄美尐妖づ 提交于 2020-01-06 04:26:09
问题 When building in Qt Creator using the MinGW toolchain, on Windows, the build is slowish. Takes 21sec for a tiny project. Any fix? 回答1: The fix was to switch to the Microsoft toolchain (including the MSVC compiler and the CDB debugger). Qt Creator supports that toolchain. This brought down build time for me from 21 to 11sec. Also, it brought "build when nothing has changed from the last build" from 4 to 0sec which is a big win as well. Note: The "Compilers" tab in Qt Creator's options listed a

Calling a FORTRAN DLL using ctypes

末鹿安然 提交于 2020-01-06 01:47:11
问题 I am trying to learn how to complie FORTRAN code into a DLL that I can call from Python using ctypes. Even a simple example is not working, can anyone help? I have a single procedure in FORTRAN: subroutine ex(i) integer i i=i+1 return end Then I try to run this from Python I compile it with the MinGW complier as follows gfortran -c test.f gfortran -shared -mrtd -o test.dll test.o Looking at the DLL created I see Microsoft (R) COFF/PE Dumper Version 12.00.30723.0 Copyright (C) Microsoft

Windows 7 MinGW compilation error using Boost ASIO

时间秒杀一切 提交于 2020-01-05 09:30:49
问题 Having trouble compiling the following C++ code on Windows 7: #include <boost/asio.hpp> #include <iostream> void handler1(const boost::system::error_code &ec) { std::cout << "5 s." << std::endl; } void handler2(const boost::system::error_code &ec) { std::cout << "10 s." << std::endl; } int main() { boost::asio::io_service io_service; boost::asio::deadline_timer timer1(io_service, boost::posix_time::seconds(5)); timer1.async_wait(handler1); boost::asio::deadline_timer timer2(io_service, boost:

MySQL C API compilation error, crtdbg.h not found

瘦欲@ 提交于 2020-01-05 08:01:08
问题 I'm creating a basic C program that uses the mysql api. I'm on windows, using mingw as my compiler and eclipse cdt as my IDE. I have added the include path to the mysql include files and the lib path to the mysqlclient.lib file. However, I get this error: D:\Programs\MinGW\include\mysql/my_dbug.h:108:20: fatal error: crtdbg.h: No such file or directory Here is my code: #include <stdio.h> #include <my_global.h> #include <mysql.h> int main(int argc, char *argv[]) { printf("Hello World\n");

C++/mingw-gcc-g++ string declaration error

谁说胖子不能爱 提交于 2020-01-05 07:20:41
问题 I am using g++ to compile a very simple c++-program with g++ main.cpp -o main.exe My code: #include <string> int main() { std::string a; return 0; } [Windows 10 | mingw-gcc-g++ 6.3.0-1] When I try to run the created main.exe, I get the exit code: 3221225785. gdb returns: (gdb) start Temporary breakpoint 2 at 0x401464 Starting program: C:/[...]/main.exe [New Thread 14272.0x1238] [New Thread 14272.0x548c] [New Thread 14272.0x42fc] [New Thread 14272.0x3db4] During startup program exited with

C++/mingw-gcc-g++ string declaration error

懵懂的女人 提交于 2020-01-05 07:20:33
问题 I am using g++ to compile a very simple c++-program with g++ main.cpp -o main.exe My code: #include <string> int main() { std::string a; return 0; } [Windows 10 | mingw-gcc-g++ 6.3.0-1] When I try to run the created main.exe, I get the exit code: 3221225785. gdb returns: (gdb) start Temporary breakpoint 2 at 0x401464 Starting program: C:/[...]/main.exe [New Thread 14272.0x1238] [New Thread 14272.0x548c] [New Thread 14272.0x42fc] [New Thread 14272.0x3db4] During startup program exited with

Permission denied - cannot open outputfile

倖福魔咒の 提交于 2020-01-05 07:06:09
问题 Now and then I get this compilation error when compiling a c-file in Eclipse. c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot open output file main.exe: Permission denied It happends when I have made a change in the source-code - but not always. I know how to solve this* but I would like to know WHY it occurs and how to avoid it? * In eclipse I go to the debugger and terminate the main thread of the program 回答1: You said it yourself, it happens because the program