Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monodevelop extra g++ compiler options on linux

I am trying to port over a windows c++ application to run on linux and I am using monodevelop. I have run into a compile error, and after some research I figured out that I need to specify the -std=c++0x flag for g++ to compile it correctly. When I run g++ with this flag on the command line it compiles fine. However, I cannot see a way to add this through monodevelop. Under options->Code Generation I see some text for "extra compiler options", but there is no way to add anything to this list. No buttons or text boxes are visible. I also opened up the .cproj file to see if I could just add it manually, but I am not seeing anything obvious where I would put this. Does anyone know how to add compiler options in monodevelop?

like image 884
dcofer Avatar asked Jun 25 '26 23:06

dcofer


1 Answers

In monodevelop 4 and up, you can add custom compiler options such as -std=c++11 and so forth. To do this, you'll need the latest MonoDevelop installed, you can compile it manually from github or install it from the Ubuntu PPA http://ppa.launchpad.net/v-kukol/mono-testing/ubuntu .

After you have it installed, all you have to do is go to Project > 'Project Name' Options and go to Build > Code Generation and add the compiler options where it says Extra Compiler Options.

like image 145
Victor Martinez Avatar answered Jun 28 '26 14:06

Victor Martinez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!