Obtaining MinGW installation with GCC 4.1.1 - c

I need to use the GCC compiler version 4.1.1 on Windows, from a MingGW distribution if possible.
I've been looking for a way to install an older version with the mingw-get installer but I don't find any option to select a specific version. Nevertheless, the official Sourceforge repository doesn't seem to contain the files for this version (http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/)
After searching in alternative distributions like Nuwen or TDM-GCC I haven't found a release including GCC 4.1.1.
My question is, is there any place to obtain a MinGW with GCC 4.1.1, or is there another way to obtain this toolchain?
Thanks.

Related

OpenMP support on OSX 10.11, gcc errors with "file omp.h not found"

I have been using gcc version 5.3.0. It says that it comes with openmp support. But every time when I compile a program using either gcc [by terminal] or via xCode 7, I get same error, "file omp.h not found". I have searched too much on this issue and tried almost everything I found.
First I tried to locate omp.h on my mac. I found some files; then in header file, I used that specific location of omp.h but no help [it gave me linker error].
I installed gcc version 6.0 (pre-release) but no help. I tried changing C_INCLUDE_PATH [which is now, and previously set to none] but that didn't helped me as well.
I reinstalled clang-omp but no help.
I am using llvm compiler version 7.0. Although i have installed clang-omp, there is no omp.h in my /usr/include/*
I changed the compiler and now I am able to run it. [It was issue of clang, which I couldn't solve].
I am a student and Intel is giving Intel Parallel Studio 1 year licence for free to students.
So I downloaded, and installed it.
In xCode, under build settings, I set my compiler to 'Intel C/C++ compiler' and in parallalization, I turned it to 'yes'. That was it. Then it compiled successfully. But, note that you won't be using header file 'omp.h' anymore.
By the way, I am still looking for answers, just to know what I was doing wrong.
You can install 'clang-omp' or 'gcc' (corresponds to GCC 5.3 right now) packages via Homebrew, both of which support OpenMP.
The built in GCC is based upon GCC 4.2.1 abs uses LLVM back end via Dragonegg, which is why it doesn't support OpenMP.
As noted already, Intel compilers support OpenMP on Mac.
I don't use Xcode editor so I don't know how to use any of these from there, but all will work from terminal just as they do on Linux.
the compiler on the mac is clang (based on llvm 3.5) which does not support openmp.
you can try install llvm/clang/openmp from source or using prebuild binaries, but I must admit it does not work as advertised for me…
edit unless you use the -fopenmp=libomp flag.

C libraries installation on Mac OSX

I have recently switched from Windows to Mac . I was told that Xcode has the C/C++ libraries(GCC) included. Apparently, the new Xcode 5 doesn't have them. As IDE, I have CodeBlocks downloaded. How do I install the libraries for CodeBlocks in Mac?
Apple deprecated gcc in XCode5 (after giving warning for quite a few releases). The main reason for this was that clang is now the system compiler, along with libc++, its accompanying standard library. One of the motivations for the move to clang is that the IDE makes heavy use of the compiler's modular architecture for code syntax highlighting, indexing and refactoring.
I can't imagine many reasons why you actually would specifically need GCC if building software on MacOSX and iOS. Clang has had the edge of GCC in both compilation speed and standards compliance for some time.
What you may need to do, if you haven't already, is install the optional XCode5 command-line tools package (the UI for this changed a few versions ago - google for the solution to your version of XCode5). This installs clang and other command-line tools (or more likely symlinks to them) in /usr, which where external tools and build and configuration tools such as cmake and autoconf expect them to be. clang is also aliased to cc.

How do I fix a "version `GLIBC_2.14' not found" error?

I've compiled a C program under Ubuntu 12.04, built a Debian package out of it, and want to install it on a server running Debian Lenny.
Last time I did that (about two months ago) it worked: I could install the package and run the binary. But now I get the following error message:
(binary's name): /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by (binary's name))
Other than upgrading my machine to Ubuntu 12.4, the only significant change we've brought to the code is a call to strdup(), for which I had to enable the _POSIX_C_SOURCE=200809L feature test macro.
Upgrading the server to the latest Debian version is not my preferred option as it is not under my direct control.
How do I fix this problem?
I think the critical bit of info here is 'upgrading my machine'. So when this worked before, you were building and packaging on something earlier than 12.04? If so, then the issue is that 12.04 now ships with a newer version of libc (apparently 2.14), and your binary now records a dependency on that version of libc. When you try to run on Lenny, which likely uses an older version of libc, the linker detects that the Lenny version does not support the 2.14 API, and fails.
I think the best way forward is probably to do your development and testing on 12.04, and then when you want to create packages for a specific Debian release, use pbuilder or similar to create debs. This will ensure that the libraries used for the packaging build match the target platform.

Which version of gcc to install with MinGW?

If compiling and linking with MinGW gcc v3 is painfully slow, and gcc v4 is not the default install option: What, for a beginner are the advantages/disadvantages of installing one version or another?
Say for example with gcc v4, I want to use PDCurses or other GNU libraries will I first have to recompile these from source?
I'm only asking here about C and not C++.
I've been using MinGW with GCC4 for some time and didn't encounter any problems, so I'd say go for it. Also, there's no need for recompilation as the C ABI on Windows has been stable for a long time.
The TDM GCC/MinGW32 builds installer includes gcc 4.4.x and all the core binary packages required for basic Windows development, including gdb. It's widely used without any unusual problems.
One advantage of gcc4 is that you can compile recent QT4.6, as it is compiled with gcc4.
Of course some new additions, like OpenMP need new gcc versions.
However, there are complains about MingW port of gcc4 to be unstable for certain applications.

Question about Macports

I just got Macports installed on my mac, of which os version is Snow Leopard (10.6). I used Macports to install several packages through 'sudo port install' command, and all these packages are reported active after the installation. I just wonder that whether these packages are really working? For example, macports tells me that 'gcc44 #4.4.2_0 (active)', however in python it says '[GCC 4.0.1 (Apple Inc. build 5493)] on darwin'.
So I just want to know that if there is some problem with my method of installing or my macports needs some configuration after installation?
Any help is appreciated! I am really new in Mac OS.
I believe Python is declaring the version of gcc used to build it which should be the gcc installed on your Mac i.e. the version that came with the Mac OS Development tools. This should be located in /usr/bin/gcc.
You should find the gcc version matches when you execute
/usr/bin/gcc -v
I do not think anything is wrong with your setup or configuration. It just shows Python was compiled using the gcc provided by Apple
Macports installs software not to conflict with the versions provided by Apple. If they replaced the C compiler and libraries, really bad things might happen when Apple provided operating system updates.
gcc is the command for Apple's version of gcc, at /usr/bin and version 4.0.1 for Leopard.
gcc-mp-4.4 is the command for gcc version 4.4 as provided by MacPorts, located at /opt/local/bin.
Similarly there will be versions of python in /opt/local/bin.
Like houmam, I prefer to explicitly invoke versions by name. If you want to connect particular versions to python, I think that the MacPorts package python_select (this has now been replace by port select python) implements this by using symbolic links. I've never used it.
It probably is just that compiler that was picked by the build was that installed by XCode. You can try typing which gcc to see which one is in your path. The macports one would by default be in /opt/local somewhere.

Resources