C++ Include Paths

I am just starting to use Sun Studio 12 and I have a problem with include files. I am not sure what I am doing will compile or run but I did not expect to get errors that file s could not be found. in the tools.options.C/C++.Code Assitance.C++ Compile.Include Directories I have:
/opt/SUNWspro/prod/include/CC/Cstd
/opt/SUNWspro/prod/include/CC/std
/opt/SUNWspro/prod/include/CC
/opt/SUNWspro/prod/include/CC/rw7
/opt/SUNWspro/prod/include/cc
/usr/include
/usr/include/libgnomeui-2.0
My source file of test.cc has
#include <stdlib.h>
#include <gnome.h>
#include <gtk/gtk.h>
gnome.h is in /usr/include/libgnomeui-2.0 and I have created symbolic links that define /usr/include/gtk, /usr/include/libgnomeui, /usr/include/gdk and other gnome include directories. gnome.h is in /usr/include/libgnomeui-2.0. From the editor I can access gnome.h and gtk.h by right-clicking and selecting Go To.Include. If I open gtk.h, the editor shows all of the files included in that module as undefined.
When I compile I get:
"test.cc", line 9: Error: Could not open include file<gnome.h>.
"/usr/include/gdk/gdkcolor.h", line 30: Error: Could not open include file<cairo.h>.
Plus a bunch more
I expected that the compiler would use symbolic links. What am I doing wrong? Also I wanted to add the "-H" option when the compiler is invoked. Where would I add that in the Tools.Options settings?
Thanks,

Try going to Project Properties->C/C++/Fortran->C Compiler->General->Include Directories and adding your include directories there.

Similar Messages

  • Dll import wizard won't go past "Configure include paths"

    In the LabVIEW 8.5 version of the "Shared Library Import Wizard" I'm unable to proceed past the "Configure include paths" screen. I get a dialog that reads "Parsing header file" butI am returned to the"Configure Include Paths" screen.
    The library imported without error in LabVIEW 8.2.1.
    There is no "Report Generation Toolkit" installed.

    I can confirm that I am able to use the "Call Library Function"
    nodes and that there are no errors indicated when running the wizard. I
    get up to the "configure_paths" screen and when I click Next I am shown
    the "parse_dialog" screen momentarily but am returned to the
    "configure_paths" screen after about 3 seconds.
     I have
    tried an install on another machine with identical results. The .dll I
    am importing was created in MS Visual Studio Express 2008 and imports
    well under LabVIEW 8.2.1's import wizard.
    Attachments:
    configure_paths.JPG ‏37 KB
    parse_dialog.JPG ‏8 KB

  • OpenCL include path with spaces

    Hi!
    I tried passing additional include paths to the clBuildProgram(...) function using "-I dir" as given in the specification. This works perfect as long as the directory name given does not contain any spaces. However on some platforms you cannot avoid the path to contain spaces, so the application needs to be able to handle this. Did anybody figure out a way to pass directory names containing spaces in a way that the Apple implementation can handle? The AMD implementation understands using -I "dir". Sadly that syntax will break the Apple implementation. Did you find another way?

    after change the "PATH" on Windows you need to restart the machine.

  • (VS 2010 C++) cl.exe crashes when a lot of include paths are passed with /Zi, looking for workarounds

    Hello
    If i pass a lot of include paths to cl.exe that comes with Visual Studio 2010, and i also pass /Zi, cl.exe crashes (16.00.40219.01). Here's an attachment to reproduce the issue: http://www.filedropper.com/clexecrash
    Extract the folder to your system drive root (C:\), and paste the contents of command.txt into a cmd.exe instance. cl.exe will crash.
    test.cmd is a command file containing the line "/IREALLY_LONG_BOGUS_INCLUDE_PATH" 683 times, and /Zi. Please note, that if you either remove even one line of "/IREALLY_LONG_BOGUS_INCLUDE_PATH" or /Zi, the issue goes away. Without /Zi, there
    seems to be no limitation of include paths. Please also note, that it's not the sheer number of /I switches that causes this crash, if you replace REALLY_LONG_BOGUS_INCLUDE_PATH with something longer, you can crash cl.exe with less /I switches.
    This issue is also present in Visual Studio 2012 (17.00.61030), but seems to be fixed in 2015 CTP 5 (i don't have access to Visual Studio 2013, so i can't try). I know Visual Studio 2010 is not supported anymore, so does anyone know a workaround for this problem?
    Thanks in advance,
    Peter

    I cannot reproduce this issue with VS2013, your sample works well and generate a pdb file.
    It seems a issue in VS 2012, but sorry about that I have no workaround for this. Please check this thread: this issue only appear in debug mode.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/018ef85a-f172-4278-8215-30ad2a8accc2/clexe-crashes-using-large-number-of-include-directories?forum=vcgeneral
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • The product archive is invalid. The installer package may not include paths

    I try again here, since we got no further and this message is becoming a show-stopper for us.
    We have a simple app-file and build a package from this with Productbuilder only using
    productbuild --component 'INtex Fahrtenbuch AS.app' --sign '3rd Party Mac Developer Installer: INtex Publishing GmbH & Co. KG' 'InstallationINtexFahrtenbuchAS.pkg'
    Furthermore we checked for extended attributes everywhere with
    ls -lad@ *
    and removed any with
    xattr -d -r com.apple.FinderInfo *
    xattr -d -r com.apple.ResourceFork *
    Packaging with Product Builder went fine and installation test with sudo was no problem.
    Still we can´t upload our installer to iTunes connect. Message is once again but this time only:
    The product archive is invalid. The installer package may not include paths outside of a bundle.
    What can we do about that ? There is no path outside the bundle ...

    lemkesoft wrote:
    I have here the same problem with one of my apps.
    Do you have any solution now?
    Welcome to Apple Discussions, Mr. GraphicConverter
    The standard suggestion is to clean and rebuild. There were a number of such posts on the paid Developer Forums a few weeks ago, but nothing since.

  • [SOLVED] gtkmm/glibmm include path trouble

    I am having trouble including gtkmm in my C++ application. When I simply try
    #include <gtkmm.h>
    without changing any compiler options, I get errors about g++ not finding some gtkmm/glibmm header files (first of which is gtkmm.h, of course). Thus I apparently need to add their directories to my include path explicitely on the command line or in the Makefile, starting with: -I=gtkmm-2.4/ -I=glibmm-2.4/ -I/usr/lib/glibmm-2.4/include/ -I=glib-2.0  . . .  and so on.
    This cannot be the right way to do that, can it? Is there something wrong with my global compiler options? Am i missing symlinks in /usr/include/? Are the header files misplaced (which would be the packages' fault)?
    Last edited by Franek (2010-07-25 10:41:26)

    Thanks for pointing me to pkg-config!
    However this does not completely resolve my issue, pkg-config still does not provide the include path to glibmmconfig.h (which is /usr/lib/glibmm-2.4/include/glibmmconfig.h).

  • Getting code into CS3/CS4 default include path

    Hello!
    I have a series of AS3 classes that I want to install into the default directory that Flash looks for when, in code, one writes:
    import com.flashsim.FStEng.Three.*;
    In AS2, there is the Classes/ directory within the Configuration folder.  Very easy, nice.  In AS3, that folder is not consulted, and I understand the Flash IDE does some kind of internal mapping.
    I have created a SWC and added it to my Library path.  However, I would like to package the SWC in a (code-only) component and put it in a folder that Flash is, by default, looking at to consult swc's.  Alternatively, if there were an "include" directory, I could put the as files.  However, when I try to put the SWC in the Configuration folder's Libraries, or ActionScript 3.0/libs (the "libs" I had to create), or I put the as files in the Include folder, my Flash code cannot access the stuff being imported.
    Is there any default place Flash looks for where I can put a SWC or code?
    Thanks!
    -jonathan

    I don't know what the deafults are as far as where Flash looks for things, though you may be able to get an idea of that if you set about creating your own paths for Flash to check.
    You can create a folder for any classes you want to utilize and add the path to that folder into your classpath(s). Here's a for instance (though you can decide on your own structure). Let's say you want to create a folder called AS3Classes to store all of your class files. You decide you want to locate it in your FlashDesign folder. So the path to that folder would be (merely an example)...
    C:\Documents\FlashDesign\AS3Classes
    To add this path to your classpath(s), In Flash, select Edit -> Preferences -> Actionscript (in the side list) -> AS 3.0 Settings (button)
    Click the + sign in the classpath interface and enter that path as a new one. You're done there so click the OK's to make a clean getaway.
    Next, in that AS3Classes folder you can add another folder named myClasses. which you can dedicate to classes you create (you can add other folders for other classes you acquire from others... you'll find the AS3Classes folder handy if/when you do).
    So, for your package you only need to define...
    package myClasses {
    The classpath will take care of the rest when things get searched for. Just place your class file in the myClasses folder and you're ready to use it...
    import myClasses.ClassName;

  • Tomcat 4/Apache 2: Are spaces in include path a problem?

    Hi,
    Like so many before me, I am trying to make TOMCAT 4.0.4 and Apache 2.0.39 play together on Windows 2000, and am failing miserably. I followd several different approaches with no success. When I place the include directive in httpd.conf, Apache won't start.
    All of my paths to TOMCAT have spaces in them ("Program Files/Apche..."). Is this an issue? Other than that, I have no idea why it isn't working.
    Here is what I have done:
    -Downloaded mod_jk.dll and placed it in Apache/modules directory
    -Created a workers.properties file
    -Created a mod_jk.conf file
    Any help appreciated!
    - j

    If you are having difficulty with the Tomcat portion of the set-up try this guide;
    http://www.moreservlets.com/Using-Tomcat-4.html

  • PHP include path for command line applications

    I'm packaging my first contribution to the AUR: a package for Boris, a tiny REPL for PHP.
    The issue I'm finding is that it includes a file relative to where the bin is and it somewhat conflicts with Arch's recommendation for using /usr/lib/pkgname for shared files. You can see the offending line here: https://github.com/d11wtq/boris/blob/ma … n/boris#L6
    I fixed it with sed, but I'm not happy with the solution I wrote. I hoped for PHP shared libraries to have a $PATH such as Python packages, but it seems like it doesn't (by default). See my pkgbuild here: http://sprunge.us/TYgj

    I do it using the registry.  Here is a post where I have a AutoIt EXE scan for what versions of the runtime engine are installed.  And then it runs an EXE that is compatible with the run-time engine or development environment installed.
    http://lavag.org/topic/17803-run-exe-based-on-installed-run-time/
    But you can also do it from a VI.  Attached is a VI that will find the Run-Time versions installed and development with path to the EXE/DLL.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    LabVIEW Versions Installed Registry.vi ‏37 KB

  • Custom "include path" for UFLs

    Hi,
    in older versions it was necessary to include UFLs written in C to "c:\WINDOWS\Crystal". Nowadays, "C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86" seems to be the appropriate path.
    Is there any way to force CR to search within a different path? For example, I'd like my UFL to be loaded from the program directory of my own application.
    Setup: .NET 2.0 with CR2008 SP2
    Regards,
    Florian

    Hi Florian,
    CR uses the location of the EXE, then the working folder specified in the Icon, then the Windows System folder then down the PATH statement.
    So yes putting your UFL dll in your folder should work?
    Also there is now support for full UNICODE strings in an updated UFL. I'll check if it's available on our download or sample site...
    Did you try it and if so what were the results?
    Thank you
    Don

  • Eclipse Include Paths and Symbols

    I haven't used Eclipse since January, so I'm not sure when this problem started. Before, everything worked normally, but now, when I try to write a program (I'm using C++), everything is underlined in red as if it were an error, but it runs fine. I think my problem is that in Properties > C++ General > Paths and Symbols, the GNU C++ has no include directories. I am wondering how to find out which directories I need to include; is there a way to search for them?
      Thank you!

    This happens when glibc is updated and Eclipse is still looking in the old directories (the include libraries are in directories by version number; see /usr/include/c++). It runs fine because the compiler knows where it's own libraries are. I fix it by going to Project > Properties > C/C++ Build > Discovery Options and hit "Clear discovered entries now". In addition to rediscovering your compiler, this will force Eclipse to rediscover all of the libraries next time you restart Eclipse, and this time it will find the right directories.
    Last edited by sup (2013-06-21 12:58:39)

  • File Copy to Clipboard includes path - how to avoid

    I'm writing an Automator action that does several actions to whatever file in the Finder is selected (or right-clicked).
    The first action in the Automator action is Copy To Clipboard. This works, however, it copies the entire absolute path of the file (Macintosh HD:Users:myusername:Desktop:filename).
    I'd like it to only grab the actual filename, not the entire path. Is there a way to do that?

    add the following "run shell script" action before the action that copies the file to the clipboard:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    for f in "$@"
    do
    basename $f
    done</pre>
    set to pass input as arguments for that action.

  • Include paths : questions about c++/c headers vs namespaces

    Hello,
    I'm having a hard time compiling apps on SunStudio 12 / Linux (amd64).
    The compiler keeps complaining of inane things like :
    "getVLstats.h", line 15: Error: string is not defined.
    Seems to be a namespace clash, and unfortunately I'm not that used to play around namespaces...
    In my main c++ file (getVLstats.cc) I have
    #include <iostream>
    #include <fstream>
    #include <string>
    #include  <cstdlib>
    #include "getVLstats.h"
    using namespace std;
    // getVLstats -extractionType file.ldif [file.output]
    int main (int argc, char *argv[])
    {and so on
    In my header file (getVLstats.h) I have :
    #ifndef _FILEOPS_H
    #define     _FILEOPS_H
    class VLstats
         public:
         VLstats (string);
         VLstats (void);The error mentioned above,
    "getVLstats.h", line 15: Error: string is not defined.
    is at the constructor's definition
    VLstats (string) ;
    Somehow I seem to be having some namespace clash, and I don't see how to make sure that all those clashes just go away.
    Any help would be appreciated !
    Regards,
    Jeff
    Edited by: grattojf on Oct 8, 2008 8:41 PM

    When you compile, it gets included into .cc, but before using directive for std namespace. Anyway, it's a good idea to make include independent of the place it is included so you need to make std::string visible in getVLstats.h somehow.
    First, add
    #include <string>to getVLstats.h
    Then either
    - replace string with std::string everywhere or
    - add using directive (using namespace std) or
    - add using declaration (using std::string) or
    - typedef std::string string

  • InitialContext lookup over HTTP using a full PROVIDER_URL (including path)

    Hi,
    We have a standalone Java JMS client application that is sending messages to a queue on a WebLogic (WLS 9.2 MP3) server. It uses the WLInitialContextFactory (WebLogic implementation of InitialContextFactory) class to look up the initial context over HTTP when making the connection to send messages to the queue.
    This all works fine when the client connects directly to the server - i.e. supplies the address of the server as the PROVIDER_URL. However, in our infrastructure, we cannot connect directly from this client to the server; we need to go via a HTTP proxy.
    In a basic configuration HTTP proxy we set the provider URL to be the address of the proxy server, with the proxy is configured to route all requests straight through to the WebLogic server. This configuration also works fine - the JMS client can send messages successfully.
    Unfortunately, this basic proxy configuration is still not sufficient for our Production environment. Our production proxy "fronts" multiple servers, each one identified by the first portion of the URL. So, the proxy is be configured such that requests to "http://proxy/server1/test_request" will be routed on to "http://server1/test_request", whereas a request to "http://proxy/server2/test_request" will be routed to "http://server2/test_request". This configuration works fine for basic HTTP requests, to webpages etc.
    However, when we try we use this mechanism with our JMS client over HTTP, it is not working. We set the provider URL on the client to "http://proxy/server1" in order to send a message to server1. However, we find that the WLInitialContextFactory class seems to be ignoring the final part of the URL ("server1") and still sending requests directly to the root proxy address of "http://proxy", so it doesn't work.
    I appreciate that this can be viewed as a WebLogic specific implementation issue for their WLInitialContextFactory, and I've raised a query with their support people on this. From my own research however, it seems the behaviour of their factory is not different to most other implementations - i.e. the major implementations would all have this issue.
    I'm wondering if anyone is aware of any implementations that would handle the situation I've described. If not (or otherwise!) is there something crazy about our approach that noone has catered for it?! It seems a reasonable situation to me, but maybe I'm missing something!
    Any comments, advice, etc. would be greatly appreciated, thanks.
    Regards,
    Adrian
    Edited by: AdrianFitz on 08-Apr-2010 12:21

    Hi,
    Thanks for the quick response. Would you mind providing a bit more detail on your suggestion, as am not 100% sure I understand it fully.
    If I see what you are getting at, are you talking about configuring proxy settings on my client side, similar to how I have to configure my internet browser with proxy settings when accessing the internet from within my companys LAN?
    If I'm interpreting that right, then I guess my use of the word proxy might be a bit inaccurate or lead to some confusion. What my orginal post described as a proxy should have been more accurately describes as a reverse proxy (acting primarily as a load balancer).
    Ideally, other than changing the URL slightly, the client should be 'unaware' that it is going through a proxy at all.
    Hope that clarifies somewhat, any further comments would be great! Thanks.
    Regards,
    Adrian

  • Fully qualified filename (including path)

    I have a sample program I'm playing with to learn a bit about JAVA. In the code below I have variables named 'file1' and 'file2' which are defined with a filenames 'file1.txt' and file2.txt respectively.
    So when the program executes it looks for these files in the current directory. However, if I want to change these values to 'c:\file1.txt' and 'c:\ttmsapps\file2.txt' then I can't compile the program.
    Would someone be able to show me in the code below how to specify a fully qualified filename? I'd certainly appreciate seeing the example.
    import java.io.File;
    import java.lang.Object;
    import java.util.Date;
    import java.text.Format;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    public class CompareFileDates {
      public static void main(String[] args) {
        String fileStatus = " ";
        String file1 = "file1.txt";
        String file2 = "file2.txt";
        long date1 = 0;
        long date2 = 0;
        String finalDate1 = null;
        String finalDate2 = null;
        boolean file1Exists = (new File(file1)).exists();
        boolean file2Exists = (new File(file2)).exists();
        if (file1Exists) {
            // Get the timestamp from file 1 and format it
            date1 = (new File(file1)).lastModified();
         Date newDate1 = new Date(date1);
         DateFormat df = new SimpleDateFormat();
         finalDate1 = df.format(newDate1);
        else {
            // File or directory does not exist
            fileStatus = file1 + " does not exist.  ";
    ...more

    Awesome. I'm getting very close.
    However, in building the variable 'file1' on the Windows-side I will need to be specific to the which Drive Letter the file exists on...for instance I may need to specify 'C:\' as part of the creation of the 'file1' variable. This is because the java program will be executed by people on the File Server on the K: drive, yet I want the program to specify a file on their C: drive. If I do this then the program wouldn't run on UNIX, right? Because UNIX doesn't have Drive Letters (e.g. C:, K:).
    In this case would I have to hard code the Drive Letter for Windows and then edit and remove the Drive Letter before running the program on UNIX?
    Here's my program so far which will run on Windows or UNIX, but it doesn't have the Drive Letter differences required on Windows so the program would have to be executed by the user on the same Drive Letter as the file I'm specifying.
    import java.io.File;
    import java.lang.Object;
    import java.util.Date;
    import java.text.Format;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    public class CompareFileDates {
      public static void main(String[] args) {
        String file1 = File.separator + "exfc" + File.separator + "its" + File.separator + "file1.txt";
        System.out.println(file1);
    }The output on Windows:
    K:\COMMON\ITS\STEVEB\java\CompareFileDates>java CompareFileDates
    \exfc\its\file1.txtThe output on UNIX:
    /data/users/ssbuechl/java/CompareFileDates >java CompareFileDates
    /exfc/its/file1.txt

Maybe you are looking for

  • :hover not working in Firefox. Help!

    Hi everyone, I created a rollover menu using :hover in CSS. The menu sits in a one-row six-column table on the page. The menu displays and works perfectly in IE6 and IE7. However, it falls apart in Firefox. The site is at http://www.labellacenter.com

  • Bugs in the latest ThinkVantage Productivity Center update

    Hi, last Friday I updated the Thinkvantage software on my T61 (WinXP). Beside fixing some problems it brought me new ones. Foremost, now, as soon as I set my machine into the Lenovo Portreplicator (docking station), it simply goes POWER OFF. No messa

  • Printing out QuickTime frames on Inkjet Printers

    I have exported a series of TIFFs from a QuickTime movie that is in RGB color mode When I print this from Photoshop via my Inket Printer, the color comes out different (i'm assuming it's the CMYK color mode) Any advice on how to get the color from th

  • OWSM content routing issue (fs/crouter)

    Hi, I am using OWSM console to implement content routing. I am following the steps mentioned in the administrator guide for OWSM. However, I am getting stuck at the very last step of content routing. Replace the endpoint URL with the following URL: h

  • Firefox won't exit out of running processes upon closing it.

    I have to restart the computer to get firefox to clear out of the "processes". I have to delete firefox completely then reload it to get it to work properly. just downloaded firefox 6.0 for windows. After a few web searches, when I close firefox, i c