mingw-w64

My C++ program won't compile on Visual Studio code

廉价感情. 提交于 2021-02-04 08:40:31
问题 I'm attempting to use Visual Studio Code for the first time and my C++ won't compile. I have already added mingw's bin and bash.exe from MSYS2 to my PATH. All of my code is in the same directory and straight from microsoft's guide https://code.visualstudio.com/docs/cpp/config-mingw (I did change the paths to mine). All of my files are also in the same directory. I've included the file helloworld.cpp: #include <iostream> using namespace std; int main() { cout << "Hello World"; } tasks.json: {

Golang 在WIN10环境下编译报 %PATH% 下无法找到gcc

随声附和 提交于 2021-02-02 11:50:05
网上大部分解决方案都是去下个mingw-w64的环境,但是国内下载实在是太缓慢了 在github上找到一个解决gcc的方法,下个 tdmgcc ,效果一样的,最主要的就是快 我遇到这个问题是在安装 go-sqlite3 时出现的 来源: oschina 链接: https://my.oschina.net/jayR/blog/4941354

Writing a Windows STDCALL DLL with Mingw64 or Cygwin compilers

百般思念 提交于 2021-01-29 20:14:12
问题 I am trying to create a C wrapper DLL to interface a commercial DLL written with the CDECL calling convention, so that it can be interfaced with existing programs written in Excel VBA (hence using STDCALL calling convention). I have exactly the same issue, probably after trying very similar things. I have tried using mingw (gcc & g++, 32 & 64 bits), and cygwin gcc flavors (gcc & g++ 32 & 64 bits). No luck. I suspect an issue with the compilation or linker, as some combinations of compiler

Set CMAKE_MAKE_PROGRAM to mingw32-make from inside the CMakeLists.txt

…衆ロ難τιáo~ 提交于 2021-01-29 18:51:05
问题 Following this post, if I run cmake .. inside my build folder with no options I get the error: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred

Set CMAKE_MAKE_PROGRAM to mingw32-make from inside the CMakeLists.txt

血红的双手。 提交于 2021-01-29 13:17:29
问题 Following this post, if I run cmake .. inside my build folder with no options I get the error: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred

Mingw-w64 toolchain for Bazel (Ubuntu 20.04.1 )

不打扰是莪最后的温柔 提交于 2021-01-29 07:00:14
问题 I am trying to create my toolchain for mingw-w64 on Ubuntu with Bazel. I am following this tutorial: https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html. However, when I try to adapt the compilers paths to the paths of my mingw64 installation i get the following error: bazel build --config=mingw_config -s //main:hello-world --verbose_failures Starting local Bazel server and connecting to it... INFO: Analyzed target //main:hello-world (16 packages loaded, 46 targets

Mingw-w64 toolchain for Bazel (Ubuntu 20.04.1 )

元气小坏坏 提交于 2021-01-29 06:58:17
问题 I am trying to create my toolchain for mingw-w64 on Ubuntu with Bazel. I am following this tutorial: https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html. However, when I try to adapt the compilers paths to the paths of my mingw64 installation i get the following error: bazel build --config=mingw_config -s //main:hello-world --verbose_failures Starting local Bazel server and connecting to it... INFO: Analyzed target //main:hello-world (16 packages loaded, 46 targets

cannot build assimp with minGw64

允我心安 提交于 2021-01-29 06:34:39
问题 I used cmake and I was able to build a C::B project. But Compiling the Assimp.cbp file raised a bunch of errors. Is there someone experimented in compiling assimp with mingw64 under w10 for C::B to send me clues ? Thks in advance. Here are the log errors : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\assimp_cmd.dir/objects.a(Main.cpp.obj):Main.cpp:(.text+0x8e): undefined reference to `Assimp::Importer::ValidateFlags(unsigned

Strange behavior of C abort function on mingw-w64

只谈情不闲聊 提交于 2021-01-29 03:59:59
问题 I'm new to mingw-w64 and I'm running into the following problem: I recently installed MSYS on my Windows 10 computer according to the instructions provided in How to install MinGW-w64 and MSYS2? and I am currently trying to build some Win32 C programs. I first tried some simple programs and they seem to work; however, I ran into problems with the C abort function. If I build the following program on Linux #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { printf("bla

Mingw64-w64 attribute(format) and <cinttypes> header

浪子不回头ぞ 提交于 2021-01-28 19:02:12
问题 I'm having serious trouble getting cinttypes to work properly on mingw64-w64 when cross-compiling. I've gotten it down to a minimal(ish) example that runs in docker. inttypes_test.cpp #include <cstdio> #include <cstddef> #include <cstdint> #include <cinttypes> #include <cstdarg> __attribute__((format(printf, 1, 2))) static void myPrintf(const char* fmt, ...) { va_list args; va_start(args, fmt); vprintf(fmt, args); va_end(args); } int main(int argc, const char** argv) { int i32 = 5; int64_t