Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate GCC 4.4 with NetBeans on a Mac

I've got NetBeans 6.9 installed on a Mac OS Snow Leopard. Also, I installed gcc 4.4 through MacPorts in order to experiment with C++0x. I believe, by default NetBeans uses the standard Apple gcc 4.2 compiler which is invoked through a g++ symlink found in /usr/bin.

My question is: how can I still use the new compiler?

I tried creating a new Tool Collection in NetBeans by specifying the default directory to /opt/local/bin which is where gcc 4.4 is present. But this caused error messages, i.e. No compiler sets were found.... I also tried modifying the existing GNU Tool Collection by selectively specifying the C++ Compiler command as /opt/local/bin/x86_64-apple-darwin10-g++-mp-4.4. However, this caused build errors which I didn't even understand. Any ideas appreciated.

like image 789
Kerido Avatar asked Nov 04 '22 22:11

Kerido


1 Answers

What you describe here, adding a new tools chain with that path, just should work with gcc 4.4, see here http://forums.netbeans.org/post-70004.html
Are you sure nothing is missing in your GCC 4.4 ?

The only missing step is to click "Reset Settings" help in Code Assistance tab after creating the tool chain, to make sure that code assistance picks the new headers.

like image 73
jmd Avatar answered Nov 09 '22 13:11

jmd