Version 10 vs 22
Version 10 vs 22
Edits
Edits
- Edit by 0xseantasker, Version 22
- Oct 2 2021 11:34 AM
- Edit by 0xseantasker, Version 10
- Aug 13 2015 10:06 PM
Edit Older Version 10... | Edit Current Version 22... |
Content Changes
Content Changes
==NetBeans==
[[https://netbeans.org | NetBeans]] is a cross platform IDE. If you prefer using another IDE, feel free, but you may need to configure project settings yourself.
We are currently using version 8.0 so that is the supported version for project configurations at this time.
==Setting Up==
===Prerequisites===
```
sudo apt-get install openjdk-7-jdk
```
===Installing===
Download NetBeans from the downloads page of their website: https://netbeans.org/downloads/
The "All" version of the IDE is recommended if you are considering developing for Android platforms, as it is packaged with the Java Development Kit (JDK) which Android development requires.
===Fixes for Ubuntu based systems (possibly others)===
====Allow Debugging Attachment====
Fix for `ptrace: Operation not permitted.` error message when attempting to attach debugger:
Set `kernel.yama.ptrace_scope = 0` in `/etc/sysctl.d/10-ptrace.conf`
gksudo gedit /etc/sysctl.d/10-ptrace.conf
As seen [[http://blog.mellenthin.de/archives/2010/10/18/gdb-attach-fails-with-ptrace-operation-not-permitted/comment-page-1/#comment-141535 | here]]; thanks to @0xSeanTasker for finding it.
====Better view of standard library containers in debug====
GDB might not be able to read standard library containers (`std::map`, et cetera) and some tweaks will need to be done to read them...
Follow the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers: http://sourceware.org/gdb/wiki/STLSupport
(Maybe also http://stackoverflow.com/a/13132091/423481 but this wasn't necessary for me)
This only works with g++ 4.7: [[tools/gpp|ensure you have at least version 4.7]].
==Customisation==
===Keyboard Shortcut Mapping===
As most of us have a [[http://en.wikipedia.org/wiki/Job#Day_job|day job]], we are also required to use other tools that aren't quite as affordable as others (Visual Studio is $10K+ per license, other great IDEs are "free"). Visual Studio is a great IDE and due to its market dominance it is likely that programmers are familiar with the keyboard shortcuts. To make the transition to NetBeans as painless as possible, @0xseantasker took the time to map keyboard shortcuts to make them as similar as possible. The keyboard shortcuts are mapped as though Visual Studio + Visual Asset were in use. The following configuration files are available.
Visual Studio + Visual Assist key-map + suggested colours + misc settings {F53}
Visual Studio + Visual Assist key-map only {F54}
To use these, go to "Tools -> Options" and press the Import button to import the settings.
As of this writing, Netbeans 8.0 is also available. It is unknown if the configuration files are valid for Netbeans 8.0.
Using NetBeans 8.0 should not make any difference to your build output as the IDE is independent of the tools.
The only reason NetBeans 7.4 files are provided here is because it is the most recent tested version that is in use.
NOTE: NetBeans project configuration files are no longer maintained. We have switched to cmake.
NOTE: This document is out of date and needs attention. The main issues are which versions to download. Also the keymap files do not work in NetBeans 8.1.
{F24698}
==NetBeans==
[[https://netbeans.apache.org/ | NetBeans]] is a cross platform IDE. If you prefer using another IDE, feel free, but you may need to configure project settings yourself.
We are currently using version 8.1 so that is the supported version for project configurations at this time.
NOTE: NetBeans 9 and 10 do not come with C++ plugins but the 8.2 repos can be used and still work.
[[projects/echo_3/netbeans_modules/ | Install the C/C++ plugin manually for later version of NetBeans]].
==Setting Up==
===Prerequisites===
```
sudo apt-get install openjdk-7-jdk
```
===Installing===
Download NetBeans from the downloads page of their website: https://netbeans.apache.org/download/
The "All" version of the IDE is recommended if you are considering doing any wizard development or Java development (note: Android development with Echo does not require the Java components of NetBeans as Echo provides a C++ development environment). If you are only doing C++ development, select the smaller C++ only package.
===Emblem NetBeans Modules===
Many Emblem projects will only open after [[projects/echo_3/netbeans_modules/|C/C++ and Emblem NetBeans Modules]] have been installed, else NetBeans will fail with the error `<unrecognized project; missing plug-in?>`.
===Faster builds===
If you have a multi core CPU you can enable parallel building with make using the `-j` flag followed by the number of parallel processes to use. To configure this:
1. Open NetBeans options. {nav Tools > Options}
2. Select the C/C++ category
3. Select the {nav Project Options} tab
4. In the Make Options box enter `-j n` where n is the number of processes to use.
NOTE: Make sure you have enough resources for the number of processes you request. DO NOT specify more than the number of cores you have. I recommend keeping at least one core free. So on a 4 core system I would set this to 3. If you have a processor with pseudo cores such as the i7 you can use the extra cores too, so for example I'm currently running an i7 which reports 8 cores (4 cores with 2 threads each), so I have my command line option set to `-j 7`
===Fixes for Ubuntu based systems (possibly others)===
====Allow Debugging Attachment====
Fix for `ptrace: Operation not permitted.` error message when attempting to attach debugger:
```
sudo su -
echo 0 > /proc/sys/kernel/yama/ptrace_scope
```
And to make the change permanent, set `kernel.yama.ptrace_scope = 0` in `/etc/sysctl.d/10-ptrace.conf`
gksudo gedit /etc/sysctl.d/10-ptrace.conf
As seen [[http://blog.mellenthin.de/archives/2010/10/18/gdb-attach-fails-with-ptrace-operation-not-permitted/comment-page-1/#comment-141535 | here]]; thanks to @0xSeanTasker for finding it.
====Better view of standard library containers in debug====
GDB might not be able to read standard library containers (`std::map`, et cetera) and some tweaks will need to be done to read them...
Follow the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers: http://sourceware.org/gdb/wiki/STLSupport
(Maybe also http://stackoverflow.com/a/13132091/423481 but this wasn't necessary for me)
This only works with g++ 4.7: [[tools/gpp|ensure you have at least version 4.7]].
==Customisation==
===Keyboard Shortcut Mapping===
As most of us have a [[http://en.wikipedia.org/wiki/Job#Day_job|day job]], we are also required to use other tools that aren't quite as affordable as others (Visual Studio is $10K+ per license, other great IDEs are "free"). Visual Studio is a great IDE and due to its market dominance it is likely that programmers are familiar with the keyboard shortcuts. To make the transition to NetBeans as painless as possible, @0xseantasker took the time to map keyboard shortcuts to make them as similar as possible. The keyboard shortcuts are mapped as though Visual Studio + Visual Asset were in use. The following configuration files are available.
{F4379}
To use this mapping, go to "Tools -> Options" and press the Import button to import the zip file. Then select the Visual Studio keymap.
==Troubleshooting==
[[http://wiki.netbeans.org/FaqSlowNetBeans|Poor performance?]]
NOTE: NetBeans project configuration files are no longer maintained. We have switched to cmake.
NOTE: This document is out of date and needs attention. The main issues are which versions to download. Also the keymap files do not work in NetBeans 8.1.
{F24698}
==NetBeans==
[[https://netbeans.orgapache.org/ | NetBeans]] is a cross platform IDE. If you prefer using another IDE, feel free, but you may need to configure project settings yourself.
We are currently using version 8.01 so that is the supported version for project configurations at this time.
NOTE: NetBeans 9 and 10 do not come with C++ plugins but the 8.2 repos can be used and still work.
[[projects/echo_3/netbeans_modules/ | Install the C/C++ plugin manually for later version of NetBeans]].
==Setting Up==
===Prerequisites===
```
sudo apt-get install openjdk-7-jdk
```
===Installing===
Download NetBeans from the downloads page of their website: https://netbeans.org/downloads/apache.org/download/
The "All" version of the IDE is recommended if you are considering doing any wizard development or Java development (note: Android development with Echo does not require the Java components of NetBeans as Echo provides a C++ development environment). If you are only doing C++ development, select the smaller C++ only package.
===Emblem NetBeans Modules===
Many Emblem projects will only open after [[projects/echo_3/netbeans_modules/|C/C++ and Emblem NetBeans Modules]] have been installed, else NetBeans will fail with the error `<unrecognized project; missing plug-in?>`.
===Faster builds===
If you have a multi core CPU you can enable parallel building with make using the `-j` flag followed by the number of parallel processes to use. To configure this:
1. Open NetBeans options. {nav Tools > Options}
2. Select the C/C++ category
3. Select the {nav Project Options} tab
The "All" version of the IDE is recommended if you are considering developing for Android platforms4. In the Make Options box enter `-j n` where n is the number of processes to use.
NOTE: Make sure you have enough resources for the number of processes you request. DO NOT specify more than the number of cores you have. I recommend keeping at least one core free. So on a 4 core system I would set this to 3. If you have a processor with pseudo cores such as the i7 you can use the extra cores too, so for example I'm currently running an i7 which reports 8 cores (4 cores with 2 threads each), as it is packaged with the Java Development Kit (JDK) which Android development requires.so I have my command line option set to `-j 7`
===Fixes for Ubuntu based systems (possibly others)===
====Allow Debugging Attachment====
Fix for `ptrace: Operation not permitted.` error message when attempting to attach debugger:
```
sudo su -
echo 0 > /proc/sys/kernel/yama/ptrace_scope
```
SAnd to make the change permanent, set `kernel.yama.ptrace_scope = 0` in `/etc/sysctl.d/10-ptrace.conf`
gksudo gedit /etc/sysctl.d/10-ptrace.conf
As seen [[http://blog.mellenthin.de/archives/2010/10/18/gdb-attach-fails-with-ptrace-operation-not-permitted/comment-page-1/#comment-141535 | here]]; thanks to @0xSeanTasker for finding it.
====Better view of standard library containers in debug====
GDB might not be able to read standard library containers (`std::map`, et cetera) and some tweaks will need to be done to read them...
Follow the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers: http://sourceware.org/gdb/wiki/STLSupport
(Maybe also http://stackoverflow.com/a/13132091/423481 but this wasn't necessary for me)
This only works with g++ 4.7: [[tools/gpp|ensure you have at least version 4.7]].
==Customisation==
===Keyboard Shortcut Mapping===
As most of us have a [[http://en.wikipedia.org/wiki/Job#Day_job|day job]], we are also required to use other tools that aren't quite as affordable as others (Visual Studio is $10K+ per license, other great IDEs are "free"). Visual Studio is a great IDE and due to its market dominance it is likely that programmers are familiar with the keyboard shortcuts. To make the transition to NetBeans as painless as possible, @0xseantasker took the time to map keyboard shortcuts to make them as similar as possible. The keyboard shortcuts are mapped as though Visual Studio + Visual Asset were in use. The following configuration files are available.
Visual Studio + Visual Assist key-map + suggested colours + misc settings {F53}
Visual Studio + Visual Assist key-map only {F54}
To use these, go to "Tools -> Options" and press the Import button to import the settings.
As of this writing, Netbeans 8.0 is also available. It is unknown if the configuration files are valid for Netbeans 8.0.{F4379}
Using NetBeans 8.0 should not make any difference to your build output as the IDE is independent of the tools.
The only reason NetBeans 7.4 files are provided here is because it is the most recent tested version that is in use.To use this mapping, go to "Tools -> Options" and press the Import button to import the zip file. Then select the Visual Studio keymap.
==Troubleshooting==
[[http://wiki.netbeans.org/FaqSlowNetBeans|Poor performance?]]