I'm trying to build a 64 bit executable on Windows using MinGW that links to LAPACK and BLAS. Several sources referred me to the prebuilt MinGW 64 bit lib and dll files here:
https://icl.cs.utk.edu/lapack-for-windows/lapack/
However, linking to those files fails with message "skipping incompatible x64_mingw/liblapack.dll when searching for -llapack" when I use x86_64-w64-mingw32-gcc.exe to compile and link. Anyone know why that is?
Related
I like windows gcc equation.com because it like ran natively just like windows compiler. However :
I will need some dll's that not included on distributed package. if i compiled a windows equation.com gfortran program like using Openblas, it will need libgcc_s_seh-1.dll libgfortran-5.dll libquadmath-0.dll libwinpthread-1.dll.
I could find it on web. But how to make it statically linked, i saw libgcc.a libgfortran.a libquadmath.a libpthread.a so i dont have to copy the dll from other. It is possible ?
For several c source code it need include <sys/resource.h> that not included. It's compatible with resource.h from where. After just copied from others, and recompile.
I got error :
c:\gcc\x86_64-w64-mingw32\include\sys\resource.h:74:29: error: unknown type name 'id_t'; did you mean 'pid_t'?
Is there any forum for this type gcc? Is there any debugger for windows gcc that friendly like VisualStudio Community for Intel Fortran.
Regards.
I'm trying to compile a library (dxflib) for use in windows using cygwin.
I'm loosely following the instructions found here: http://www.ribbonsoft.com/doc/dxflib/2.5/reference/dxflib-reference-manual.pdf
I can get it to compile to make a .a library (ie a unix static library), using 'make' but obviously I'm using cygwin because I want to compile a .lib for use in windows.
When I try to use 'MinGW32-make' (or any other derivative I can think of) cygwin claims that it doesn't exist. I've reinstalled all options with mingw or gcc or g++ remotely in their name in cygwin.
Does anybody know how to get it to compile from the makefile to produce a .lib? Thanks.
I need gcc installed on cygwin,
but when I search for gcc in the cygwin setup application, I get several results with the string "gcc" in their names, for example:
cygwin32-gcc-ada
cygwin32-gcc-core
cygwin32-gcc-fortran
cygwin32-gcc-g++
cygwin32-gcc-objc++
...
gcc-ada
gcc-core
gcc-fortran
gcc-g++
...
libgcc1
minigw-gcc-core
minigw-gcc-g++
....
minigw64-i686-gcc-core
minigw64-i686-gcc-g++
...
when I am searching for gcc in synaptic in ubuntu, I have a very obvious result
what am I suppose to do with these names? install all?
install a random one and then create symlinks to where ever it's binary may land to /usr/bin/gcc ?
what usefulness and productivity can be achieved from these many packages names showing up when I attempt searching for that one gcc that I keep reading online that I need to build packages that aren't on cygwin installer?
everywhere I read about "install gcc on cygwin and then continue to do this and that" they never mention which of the gcc packages above is single correct one,
its like everyone everywhere somehow already knows which gcc is the correct one and that information is no where to be found online.
I would appreciate clarification and further help.
EDIT:
sometime in the past, there actually used to be a package called just "gcc",
I found that from the screenshots here:
http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html
I can't tell how many years ago that was.
The things that make Cygwin GCC packages confusing are:
gcc-core and cygwinXX-gcc-core are confusingly related (XX is 32 or 64 depending on your Cygwin architecture).
There are packages for both MinGW and MinGW-w64, which are different projects, although many people are unaware of their coexistence (I was).
As of Oct 2015, Cygwin GCC packages are broken down like this.
In Cygwin x86 (32-bit):
PROJECT: Cygwin GCC (Windows POSIX-enabled executables via linking to cygwin1.dll)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
gcc-core x86 /usr/bin/gcc.exe
/usr/bin/cc (symlink)
/usr/bin/i686-pc-cygwin-gcc.exe (hard link)
cygwin64-gcc-core x86_64 /usr/bin/x86_64-pc-cygwin-gcc.exe
PROJECT: MinGW (Windows 32-bit standalone executables)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
mingw-gcc-core x86 /usr/bin/i686-pc-mingw32-gcc.exe
PROJECT MinGW-w64 (fork from MinGW for building 64-bit)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
mingw64-i686-gcc-core x86 /usr/bin/i686-w64-mingw32-gcc.exe
mingw64-x86_64-gcc-core x86_64 /usr/bin/x86_64-w64-mingw32-gcc.exe
In Cygwin x86_64 (64-bit):
PROJECT: Cygwin GCC (Windows POSIX-enabled executables via linking to cygwin1.dll)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
gcc-core x86_64 /usr/bin/gcc.exe
/usr/bin/cc (symlink)
/usr/bin/x86_64-pc-cygwin-gcc.exe (hard link)
cygwin32-gcc-core x86 /usr/bin/i686-pc-cygwin-gcc.exe
PROJECT: MinGW (Windows 32-bit standalone executables)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
mingw-gcc-core x86 /usr/bin/i686-pc-mingw32-gcc.exe
PROJECT MinGW-w64 (fork from MinGW for building 64-bit)
PACKAGE TARGET ARCH MAIN BINARY + LINKS (except versioned link)
mingw64-i686-gcc-core x86 /usr/bin/i686-w64-mingw32-gcc.exe
mingw64-x86_64-gcc-core x86_64 /usr/bin/x86_64-w64-mingw32-gcc.exe
The following are for compiling 32-bit binaries in 64-bit Cygwin:
cygwin32-gcc-ada
cygwin32-gcc-core
cygwin32-gcc-fortran
cygwin32-gcc-g++
cygwin32-gcc-objc++
...
The following are the main gcc pieces. If you don't need some of these specific languages, like Ada or Fortran, don't install them.
gcc-ada
gcc-core
gcc-fortran
...
This is a library required by gcc.
libgcc1
The mingw (not minigw...those appear to be typos) version are for compiling programs in Cygwin that do not depend on Cygwin1.dll. Programs built with these use the Microsoft C RTL, and can be installed on systems that don't have Cygwin. They also are not subject to Cygwin's rather restrictive Open Source License. The ones whose names do not contain 64-i686 are for producing 32-bit binaries, while the ones that do are for producing 64-bit binaries.
mingw-gcc-core
mingw-gcc-g++
....
mingw64-i686-gcc-core
mingw64-i686-gcc-g++
Note that you can see all of this information at http://cygwin.com/packages.
while porting tools to different Systems I have encounter a Problem with windows 64 bit.
I have successfully build dlls with linux 32/64 and windows32. I have tried mingw-64 with msys but unfortunately I get only 32 bit dlls. This is a part of my script to obtain the dlls
gcc -o tool_jni.dll -static-libgcc -static-libstdc++ -Wl,--add-stdcall-alias -shared - IC:/Java/jdk/include -IC:/Java/jdk/include/win32 $SOURCES
I get NO error messages, just not the desired DLLs
I am open for any solution. I dont have to use the script, I just need the DLLs.
I've downloaded MinGW with mingw-get-inst, and now I've noticed that it cannot compile for x64.
So is there any 32-bit binary version of the MinGW compiler that can both compile for 32-bit Windows and also for 64-bit Windows?
I don't want a 64-bit version that can generate 32-bit code, since I want the compiler to also run on 32-bit Windows, and I'm only looking for precompiled binaries here, not source files, since I've spent countless hours compiling GCC and failing, and I've given up for a while. :(
AFAIK mingw targets either 32 bit windows or 64 bit windows, but not both, so you would need two installs. And the latter is still considered beta.
For you what you want is either mingw-w64-bin_i686-mingw or mingw-w64-bin_i686-cygwin if you want to compile for windows 64. For win32, just use what you get with mingw-get-inst.
See http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure for an explanation of file names.
I realize this is an old question. However it's linked to the many times the question has been repeated.
I have found, after lots of research that, by now, years later, both compilers are commonly installed by default when installing mingw from your repository (i.e. synaptic).
You can check and verify by running Linux's locate command:
$ locate -r "mingw32.*[cg]++$"
On my Ubuntu (13.10) install I have by default the following compilers to choose from... found by issuing the locate command.
/usr/bin/amd64-mingw32msvc-c++
/usr/bin/amd64-mingw32msvc-g++
/usr/bin/i586-mingw32msvc-c++
/usr/bin/i586-mingw32msvc-g++
/usr/bin/i686-w64-mingw32-c++
/usr/bin/i686-w64-mingw32-g++
/usr/bin/x86_64-w64-mingw32-c++
/usr/bin/x86_64-w64-mingw32-g++
Finally, the least you'd have to do on many systems is run:
$ sudo apt-get install gcc-mingw32
I hope the many links to this page can spare a lot of programmers some search time.
for you situation, you can download multilib (include lib32 and lib64) version for Mingw64:
Multilib Toolchains(Targetting Win32 and Win64)
By default it is compiled for 64bit.You can add -m32 flag to compile for 32bit program.
But sadly,no gdb provided,you ought to add it manually.
Because according to mingw-64's todo list, gcc multilib version is done,but gdb
multilib version is still in progress,you could use it maybe in the future.
Support of multilib build in configure and in gcc. Parts are already present in gcc's 4.5 version by using target triplet -w64-mingw32.
gdb -- Native support is present, but some features like multi-arch support (debugging 32-bit and 64-bit by one gdb) are still missing features.
mingw-64-todo-list