mingw-w64

Linker error compiling mex with mingw-w64

ε祈祈猫儿з 提交于 2019-12-01 10:27:12
I'm trying to setup Mingw-w64 as the mex compiler in MATLAB 2013a. My laptop has x86_64 architecture and runs windows 7. The program I want to compile uses c++11-style threading, so I'm using mingw-w64 version 4.9.0 with posix threads. According to instruction I found here and here , I modified my mexopts.bat file. The code seems to compile successfully, but the linker reports an error. Does anyone have suggestions what I might be doing wrong? By the way, I tried using gnumex to setup the compiler, but that didn't work either. Here's the output and error message that MATLAB gives: >mex -v

Linker error compiling mex with mingw-w64

北战南征 提交于 2019-12-01 07:26:53
问题 I'm trying to setup Mingw-w64 as the mex compiler in MATLAB 2013a. My laptop has x86_64 architecture and runs windows 7. The program I want to compile uses c++11-style threading, so I'm using mingw-w64 version 4.9.0 with posix threads. According to instruction I found here and here, I modified my mexopts.bat file. The code seems to compile successfully, but the linker reports an error. Does anyone have suggestions what I might be doing wrong? By the way, I tried using gnumex to setup the

Trouble using wxWidgets 3.0.2 library under Mingw 64

北战南征 提交于 2019-12-01 06:07:17
Here's how I compiled wxWidgets libraries. Download https://sourceforge.net/projects/wxwindows/files/3.0.2/wxMSW-Setup-3.0.2.exe set path=%MINGW%\bin cd D:\wxWidgets-3.0.2\build\msw mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=debug UNICODE=1 MONOLITHIC=1 mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=release UNICODE=1 MONOLITHIC=1 Not able to link my test program with new libraries built. D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In function `wxChmod(wxString const&, unsigned short)': D:\wxWidgets-3.0.2\build\msw/../../include/wx

MinGW-W64 linker skipping incompatible files when searching for third-party static libraries

ぐ巨炮叔叔 提交于 2019-12-01 04:32:33
I'm on Windows 7 64-bit, and I'm compiling with g++ from MinGW-W64. I'm trying to compile an application that I wrote on a Unix computer. I'm running into problems, however, when I try to link against certain third-party lib<name>.lib files. Specifically, I need to link to ROOT libraries. The linker spits out errors such as C:/Users/jroth/Data/nest3/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../ ../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/root/root_v5.34.28 /lib/libGui.lib when searching for -llibGui C:/Users/jroth/Data/nest3/mingw64/bin/../lib/gcc/x86_64-w64-mingw32

Trouble using wxWidgets 3.0.2 library under Mingw 64

做~自己de王妃 提交于 2019-12-01 03:44:05
问题 Here's how I compiled wxWidgets libraries. Download https://sourceforge.net/projects/wxwindows/files/3.0.2/wxMSW-Setup-3.0.2.exe set path=%MINGW%\bin cd D:\wxWidgets-3.0.2\build\msw mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=debug UNICODE=1 MONOLITHIC=1 mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=release UNICODE=1 MONOLITHIC=1 Not able to link my test program with new libraries built. D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In

MinGW-W64 linker skipping incompatible files when searching for third-party static libraries

旧街凉风 提交于 2019-12-01 02:25:51
问题 I'm on Windows 7 64-bit, and I'm compiling with g++ from MinGW-W64. I'm trying to compile an application that I wrote on a Unix computer. I'm running into problems, however, when I try to link against certain third-party lib<name>.lib files. Specifically, I need to link to ROOT libraries. The linker spits out errors such as C:/Users/jroth/Data/nest3/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../ ../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/root/root_v5.34.28 /lib

Setting up MingW and Code::Blocks in Windows 8 64 bit

為{幸葍}努か 提交于 2019-12-01 01:10:14
I am trying to setup MingW and Code::Blocks on my Windows 8 64 bit laptop, and I'm facing some problem while building a main.cpp file. These are the versions that I have installed: x86_64-w64-mingw32-gcc-4.7.4-release-win64_rubenvb.7z for MingW (4th one in that list), and codeblocks-12.11-setup.exe for Code::Blocks . I've set the path to mingw64\bin in the environment variable. Also, in the Code::Blocks compiler settings, I have set path for all ToolChain Executables . There are two gcc in the MingW bin path. One is - gcc.exe and other is - x86_64-w64-mingw32-gcc.exe . Same for C++ Compiler ,

How to use varargs in conjunction with function pointers in C on Win64?

久未见 提交于 2019-11-30 08:37:35
问题 Consider the following C program: #include <stdio.h> #include <stdarg.h> typedef void (callptr)(); static void fixed(void *something, double val) { printf("%f\n", val); } static void dynamic(void *something, ...) { va_list args; va_start(args, something); double arg = va_arg(args, double); printf("%f\n", arg); } int main() { double x = 1337.1337; callptr *dynamic_func = (callptr *) &dynamic; dynamic_func(NULL, x); callptr *fixed_func = (callptr *) &fixed; fixed_func(NULL, x); printf("%f\n", x

OpenMP for MinGW w64?

随声附和 提交于 2019-11-30 08:33:58
问题 Are there any OpenMP binaries out there for the MinGW-w64 GCC compiler (Windows)? 回答1: There is TDM-GCC (Windows) and sezero's Personal Build (Linux and Windows). update 2012/11: Distribution Host OS MinGW-w64 Cygwin, Darwin, Linux and Windows TDM-GCC Windows MinGW-builds Windows 来源: https://stackoverflow.com/questions/5532826/openmp-for-mingw-w64

Obtaining current GCC exception model

删除回忆录丶 提交于 2019-11-30 07:08:15
g++ is built using either the DWARF2 , sjlj or seh exception model. MinGW-builds provide various builds of g++ that have different exception models. I would like to be able to determine from the gcc toolchain what exception model is being used. Is there a g++ argument that will dump the default exception model of the compiler? Edit: Originally, I was testing for the configuration flags that are described in g++ -v . As Jonathon Wakely points out in the comments, this is not a good thing to do . An inspection way to do it is to compile to assembly: struct S { ~S(); }; void bar(); void foo() { S