mingw-w64

Undefined reference to CLSID_MMDeviceEnumerator and IID_IMMDeviceEnumerator

感情迁移 提交于 2019-12-10 10:13:23
问题 Trying to compile an example code using COM and CoCreateInstance() using MinGW-w64 in C fails. #include <windows.h> #include <mmdeviceapi.h> #include <endpointvolume.h> #include <stdlib.h> #include <stdio.h> extern const CLSID CLSID_MMDeviceEnumerator; extern const IID IID_IMMDeviceEnumerator; int main( void ) { CoInitialize( NULL ); LPVOID device = NULL; const HRESULT ok = CoCreateInstance( &CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, &device );

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

旧时模样 提交于 2019-12-09 01:57:33
问题 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

Using threads with MinGW?

爱⌒轻易说出口 提交于 2019-12-08 09:19:19
问题 I am building a small tool that will need to open a thread, and let the thread do its thing, no matter what happens on that thread I don't want it to interfere with the main app, just execute, handle errors and close. How can I do this with mingw compiler? On linux I can use POSIX, but this tool will run only on win, both x86 and x64, so I've no idea how to do it. 回答1: You can use pthreads-win32. It implements most of pthreads functionality using Windows threading API. To find this, I

f90wrap on Windows (Python wrapper for Fortran 90)

China☆狼群 提交于 2019-12-08 07:50:59
问题 I've got a Python program that calls Fortran routines. These Fortran routines are wrapped with f90wrap (https://github.com/jameskermode/f90wrap), and I've verified that the setup works correctly on Linux and Mac OSX. I'm now trying to get the setup to work equally well on Windows (because I collaborate with people who cannot sometimes switch to Linux). I've got gfortran working through a MinGW installation and verified that Fortran programs compile and run without errors. I've also verified

SSL Error During Gem Installation (on MinGW64-MSys2)

谁说我不能喝 提交于 2019-12-08 06:24:01
问题 I'm using a MinGW64-MSys2 environment. When I try to install a package with gem install <package name> I get something like this SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/latest_specs.4.8.gz) 回答1: Depends on what shell you use msys or mingw* and what ruby you use you need install ca-certificates package: pacman -S mingw-w64-i686-ca-certificates or pacman -S mingw-w64-x86_64-ca-certificates or pacman -S ca

How to correctly run Cuda toolkit in Ubuntu in the WSL (eventually to be used for YOLO)?

爱⌒轻易说出口 提交于 2019-12-07 12:33:57
问题 I followed the tutorial here from the Medium: https://medium.com/@GuruAtWork/setup-fastai-ubuntu-on-windows-10-44ca50b13a9 I was following it well until a MinGW was used for command lines. I am not sure how they went about doing this as the only way I could get nvcc to work is with sudo apt install nvidia-cuda-toolkit . However, this does not seem to complete the same thing as their tool kit is installed as if the exe was just run with Windows. However, that, of course, doesn't work with the

Linking libcurl while cross compiling with mingw32 under Linux for Windows

孤街醉人 提交于 2019-12-07 04:49:46
问题 I have compiled libcurl using mingw32 and am trying to link it with my program using mingw32 for a Windows system from my Linux machine. I was outputted the files, libcurl-4.dll libcurl.a libcurl.la libcurl.lai. I have included them in my mingw32 libs folder at: /usr/x86_64-w64-mingw32/lib I was able to find a few other topics on linking with the libstdc++ and libgcc to take care dependency errors while executed but when trying to add libcurl.a it will not compile period. I used the following

Different awk results on Linux and mingw64 with CRLF line endings

 ̄綄美尐妖づ 提交于 2019-12-06 12:21:30
问题 On Linux: echo -n $'boo\r\nboo\r\n' | awk $'BEGIN { RS="\\n" } {gsub("boo","foo"); print}' | cat -v returns the expected foo^M foo^M However, on mingw64 (git bash for windows) the same command returns: foo foo without the carriage returns. I tried setting the record separator explicitly since maybe the default was different between the two platforms, but awk on mingw64 is still chewing up the carriage returns. How can I made awk do the same thing on Linux on mingw64? Note the awk versions are

How to debug DLL load failed: Invalid access to memory location

落爺英雄遲暮 提交于 2019-12-06 02:56:22
问题 I have a MinGW64-compiled DLL (python module), which gives error when loaded: ImportError: DLL load failed: Invalid access to memory location The DLL is linked only to 64bit libraries (Dependency Walker confirms that) and has debugging symbols. The code is fairly complex c++11 (around 30 source files), I cannot bisect it. I did successfully compile and tested other module with MinGW64 already, the toolchain works fine. Some people around the web reported this error for code using SSE2

MinGW64 Is Incapable of 32 Byte Stack Alignment (Required for AVX on Windows x64), Easy Work Around or Switch Compilers?

て烟熏妆下的殇ゞ 提交于 2019-12-06 02:34:01
问题 I'm trying to work with AVX instructions and windows 64bit. I'm comfortable with g++ compiler so I've been using that, however, there is a big bug described reported here and very rough solutions were presented here. Basically, m256 variable can't be aligned on the stack to work properly with avx instructions, it needs 32 byte alignment. The solutions presented at the other stack question I linked are really terrible, especially if you have performance in mind. A python program that you would