How to update g++ in windows 7 mingW? - g++

How to update g++? I'm currently having g++ version 6(something like that) c++ 14! I want to update my g++ version because i want to run std::thread and it's not possible to run std::thread in my g++ version!
Kindly help!
Thanks

Related

how to compile this cpp file that uses gmp with g++ cygwin

I followed all the instructions for setting up gmp with cygwin,
./configure make make install and make check.
The libgmp.a is in the path C:/C++/gmp-6.1.2/.libs
I'm using this command to compile with g++
g++ -L/C:/C++/gmp-6.1.2/.libs -I/C:/C++/gmp-6.1.2 C:/foo/foo.cpp -lgmp
I get an error message that says : could not find -lgmp
What am i missing?
Why not install the gmp from the cygwin distribution?

No g++ is found after installing a g++ package in Cygwin

I have installed mingw64-x86_64-gcc-g++ package in Cygwin. However, which g++ does not show any installed g++. Where is the installed compiler?
/bin/g++ is part of the gcc-g++ package.
/bin/x86_64-w64-mingw32-g++ is part of the mingw64-x86_64-gcc-g++ package.
Example

Installing recen version of GCC

I am a novice so please bear with me if I ask something that is silly in nature. I wanted to install getfem++ on my Mac for my research and had to compile it from the source as per the instructions given at:
http://download.gna.org/getfem/html/homepage/python/install.html#in-a-general-unix-linux-based-systems
However, when I give the following command:
./configure --enable-python=yes
it gives me the following error:
configure: error: g++ do not support option -std=c++11. Update g++ to at least release 4.8.1.
SO I installed g++ using Homebrew and as per the instructions given by #quine on
https://apple.stackexchange.com/questions/99077/how-to-set-gcc-4-8-as-default-gcc-compiler
I edited the bash profile and added the necessary lines to set alias.
Then I checked the g++ version using g++ -v
and it says 4.8.5 as per the last line. Now when I run the configure command as before, I get the same error. as: configure: error: g++ do not support option -std=c++11. Update g++ to at least release 4.8.1.
Can someone help me by pointing out where I am going wrong? Thank you!!

Check which version of g++ being used

I have both 32 and 64 bit g++ installed on my server and when compiling I want to make sure that I am compiling in 64 bit mode, when I do g++ --version I don't get information about which architecture package I installed, is there a way I can check command line with g++ to see if it is using the 64 bit version.
I need the 32 bit version for other dependencies so its not an option to remove that.
~$ g++ -dumpmachine
x86_64-linux-gnu

How do I write and compile Objective-C code?

How do I write and compile Objective-C code in Linux?
I heard about Clang, but I couldn't find any example/tutorial about Clang/LLVM/Objective-C.
sudo apt-get install build-essential gobjc gobjc++ gnustep gnustep-devel libgnustep-base-dev -y
vi *.m
gcc `gnustep-config --objc-flags` *.m -lgnustep-base -lobjc
You download and build LLVM as the compiler infrastructure; then you download and build the CLANG front-end to compile C/C++ and Objective C/C++.
I guess you could try following this quick start guide. Mind that Clang could actually replace GCC when working with these languages.
Take a look at http://www.gnustep.org/ they have tools for developing with Objective-C 2.0 for LINUX. The source files and hints on how to install it on several LINUX distros are here: http://www.gnustep.org/resources/sources.html
Just run the following script shown on this page:
https://gist.github.com/nicerobot/5652802
Pay attention: During the first compiling process you will get an error. Solution is just to recompile it... It works !!! Here is the blog entry from the step by step installation but I really recommend the script!
http://blog.tlensing.org/2013/02/24/objective-c-on-linux-setting-up-gnustep-clang-llvm-objective-c-2-0-blocks-runtime-gcd-on-ubuntu-12-04/#comment-54284
regards