This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have set up a remote c project and I am using curl in my C application (I am just using a virtual machine to run this project). I have installed curl and can compile just fine (the headers are all in /usr/include/ folder) in my remote host by going to the command line and running make (I am using a custom makefile). But in netbeans the line #include <curl/curl.h> Is in red and any usage of Curl variables/functions are also in red. I had this issue when I tried to use mysql and the only way was to copy to my local machine the header files and then add the location in the include directories setting but I found this solution terribly inefficient. If I have setup the project as a remote project and netbeans is able to connect to the remote host why can't I add include dirs from the remote host? (not that I should need to in this case because its in the default headers file if I am not mistaken) I believe this is an oversight and should be fixed.
Try to specify "///usr/include" for remote include paths. "///" will prevent path conversion from local to remote file system.
That did not do anything.
Could you please do the following: while staying in editor with red-underlined #include - press Ctrl-Alt-M - check "General File Information" and "Preprocessor States" and press OK. IDE will show lots of internals concerning this file in output window. Please attach this information. It would be fine if you also attach the IDE log, see http://wiki.netbeans.org/FaqLogMessagesFile (Please note that there could be host and user name and file paths you would probably like to strip)
(In reply to Vladimir Kvashin from comment #3) > Could you please do the following: > while staying in editor with red-underlined #include > - press Ctrl-Alt-M Ctrl+Alt+Shift+M
Created attachment 158211 [details] ctrl+shift+alt+M DUMP
I have attached the file. I am now in a new project where <curl/curl.h> is ok but the mysql files are not (even after putting in the header directory, which you can see in the dump) #include <my_global.h> #include <my_sys.h> #include <mysql.h> Those line are all in red as is anything to do with MySQL such as: static MYSQL *conn; I have restarted netbeans and there were no changes.
Thanks for the trace. There is System Include Paths: rfs:vagrant@127.0.0.1:9417/usr/include so, <curl/curl.h> should resolve if you claim there is /usr/include/curl/curl.h on your remote machine which you access through localhost using port forwarding at port 9417. ----------- as to mysql files. You've added your include settings to the incorrect field. Instead of Include Headers (used for -include <file> compiler option) you should use Include Directories (used for -I<dir> compiler option). If your include setting is supposed to be specified as absolute path (i.e. /usr/lib/mysql/include) then use it in format: ///usr/lib/mysql/include to prevent file path mapping. Btw, there is an easy way: Go to Tools->Options->C++->Code Assistance select Tool Collection of your remote host and add your path to mysql as system include path. Then you don't need to change it in Code Assistance options of your projects Hope it helps, Vladimir. P.S. Closing as works-for-me. Please, reopen if you still have issues