I'm planning to try out Google's NaCL. Which IDE should i use for developing? It would be nice to be able to compile the project from the IDE and run it in Chrome. Some basic debugging would be also very useful.
1 Answers
We do not have any IDE support yet. You can try Eclipse (with CDT) + Standard Make C or C++ project to automate compilation. Launching and debugging will not be possible from Eclipse.
Alternatively, you can use any editor with syntax highlighting and compile/launch by hand from cmd/bash.
Debugging on NaCl is very tricky by itself. There is no sane way to do this now.
You can use NACL_EXE_STDOUT
and NACL_EXE_STDERR
environment variables (set them to absolute paths to files where stdout and stderr of NaCl program will be written) plus --no-sandbox
chrome flag for debug printf's.
Update (March 2014)
We have Visual Studio plugin now which can be installed with naclsdk update vs_addin
. See also: https://developers.google.com/native-client/dev/devguide/devcycle/vs-addin
Also, I created a page that describes how to use Eclipse with CDT to compile and debug NaCl applications: http://www.chromium.org/nativeclient/how-tos/debugging-documentation/debugging-with-debug-stub-recommended/debugging-nacl-apps-in-eclipse-cdt

- 3,454
- 21
- 24
-
Thank you. :) I haven't followed NaCL development lately. But does this mean that IDE support is also available for PNaCL compilation as well? – NagyI Mar 28 '14 at 13:50
-
1Yes. PNaCl debugging is not that simple though. You can't debug .pexe but you can debug .nexe's generated from it. – Ha. Apr 04 '14 at 04:31
-
@Ha. Thanks for the update. I followed the steps as described to set up the paths and symbols: But I'm still getting an error (only in editor) for includes like string and sstream. Although it builds fine, the errors are annoying and interfere with autocomplete. It is strange because I can see that string.h is there under ${NACL_SDK_ROOT}/toolchain/win_x86_glibc/x86_64-nacl/include. P.S. I'm using pepper 33 on Windows – Shayan RC May 02 '14 at 11:06
-
1I would double check that include paths are added for all languages and configurations (go to "Includes" tab in "Paths and Symbols" page and click on Assembly, GNU C and GNU C++ to check that include directories doesn't change; then change the configuration and click through them again). In this doesn't help, try to right-click on the project, choose Index->Rebuild and Index->"Re-resolve Unresolved Includes". – Ha. Jul 07 '14 at 10:50