How to include header files from different directories?

Hi,
Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
Thanks,
SlowToady

Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
-I path/to/base/dirfor each such directory.
The path can be absolute, such as
-i /opt/csw/postgresql/includeor relative, such as
-I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
#include "header.h"  // right
#include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
http://docs.sun.com/app/docs/doc/819-5267
All command-line options are described in Appendix A.

Similar Messages

  • How to call java files from different directories

    hi, how do i call java files from a different directory??
    let say i got partA.java, and i need to include functions from partB.java which is in a different folder. how can i do that?

    Chicon wrote:
    Hi nuttynibbles,
    Before the class declaration in partA.java, you must have an import statement like :
    import someDirectory.partB;
    public class partA {
    ... and before you ask... you'll probably want to read through this http://java.sun.com/docs/books/tutorial/java/package/index.html

  • How to include header files with different extensions

    Hi,
    When i include a header file with extension .ch (myincludefile.ch), the compiler gives error messages but when i change the extension to .h, the problem disappears.
    Can anyone help me getting rid of this problem?
    For example, for the line below, I get a warning such as, "attempt to redefine MY_CONST without #undef". Remember when i change the extension to .h, the problem disappears.
    #define MY_CONST 500 /* Constant */
    Thank you very much

    I don't see how the name of the file could cause or prevent error messages, except when template declarations are involved. So let's assume for now that the file has a template declaration.
    The Templates chapter of the C++ Users Guide explains about including or separating template declarations and their definitions.
    If you have only a template declaration in a file and the compiler needs the definition, it will look for another file with the same base name and include it automatically. For example, if you have files foo.h and foo.cc, and foo.h has a template declaration, the compiler will include foo.cc automatically, even if you didn't intend for that to happen. You can wind up with multiple delcaration errors that way.
    When looking for a file containing template definitions, the compile will not include a .h file, so as not to create recursive inclusion. If changing the file name to .h causes your problem to disappear, it seems like an unwanted automatic inclusion is the problem.
    You can try two things to find out:
    1. Compile with the -H option. The compiler will output an indented list of all included files. See if you are getting a file you didn't intend, or the same file twice.
    2. Compile with option -template=no%extdef. It disables the automatic search for template definitions.
    If you find an unintended included file this way, you will probably have to change the names or organizaiton of some of the files. Our implementation of the C++ standard library depends on NOT using the -template=no%extdef option, which might mean you can't use that option.

  • How to read the files in different directories

    how to read the files in different directories here directory names will change dynamically under root node.
    let me say
    rootnode---->subnode1
    >subnode2
    >subnode3
    >subnode n
    how to specify these in file adapter.

    Hi
    look at this thread your problem is solved here
    File Adapter
    Regards
    Abhishek
    Edited by: Abhishek Agrahari on Dec 16, 2008 11:37 AM

  • How to access Excel files from different locations?

    Hello,
    I have successfully tested the Excel sample on WLS 7, and trying to run it on
    the WLS 8.1.
    Anyways, the common question for both is, how to access an excel files from different
    locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
    \\domain2\accounts\vouchers.xls)?
    From example i can see that it picks from a specific path under repository.
    Thanks
    Ashok Gupta

    The custom function sets the MS-Excel default directory to System.getProperty("user.dir")+"/excel"
    (the domain directory), then opens the filename passed as a parameter. I assume
    that if you pass in the fully specified path for the excel file ( like d:\MyDir\data\test.xls),
    that it would open that file.
    - Mike
    "Ashok Gupta" <[email protected]> wrote:
    >
    Hello,
    I have successfully tested the Excel sample on WLS 7, and trying to run
    it on
    the WLS 8.1.
    Anyways, the common question for both is, how to access an excel files
    from different
    locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
    \\domain2\accounts\vouchers.xls)?
    From example i can see that it picks from a specific path under repository.
    Thanks
    Ashok Gupta

  • [Urgent] How to read files from different directories?

    I am new to Java Programming, I would like to know how to read files from directories other than the current one? (example as follows)
    ProjectDirectory
    |--MainDirectory
    |--MainProgram.java
    |--SupplementDirectory
    |--SupplementProgram.java
    |--Pictures
    |--Image.gif
    What should I write in the MainProgram.java so that I can use the supplementProgram.java from MainProgram and read the Image.gif file from the MainProgram.java?
    Thanks

    Run through the I/O tutorial here. It should get you up to speed on this sort of thing...

  • Reading files from different directories and exceuting them

    D:\>cd PROC_PKG_FUNC
    mkdir FUNCTIONS
    mkdir PACKAGES
    mkdir PACKAGES_BODY
    mkdir PROCEDURES
    mkdir TYPES
    mkdir TYPES_BODY
    SQL> create directory FUNCTIONS as 'D:\PROC_PKG_FUNC\FUNCTIONS';
    Directory created.
    SQL> create directory PACKAGES as 'D:\PROC_PKG_FUNC\PACKAGES';
    Directory created.
    SQL> create directory PROCEDURES as 'D:\PROC_PKG_FUNC\PROCEDURES';
    Directory created.
    SQL> create directory PACKAGES_BODY as 'D:\PROC_PKG_FUNC\PACKAGES_BODY';
    Directory created.
    SQL> create directory TYPES as 'D:\PROC_PKG_FUNC\TYPES';
    Directory created.
    SQL> create directory TYPES_BODY as 'D:\PROC_PKG_FUNC\TYPES_BODY';
    Directory created.
    suppose,
    there is a D:\PROC_PKG_FUNC directory in my local machine where the database server exists.
    And in that directory there are different directories like FUNCTIONS,PACKAGES,PACKAGES_BODY,PROCEDURES,TYPES,TYPES_BODY, now I've created all the remote schemas obejcts in these folders using utl_file, with the help of the following package
    SQL> CREATE OR REPLACE PROCEDURE Get_Db_Ddl_Scripts AS
    2 v_file Utl_File.FILE_TYPE;
    3 v_file_dir VARCHAR2(50);
    4 i_first_line NUMBER := 1;
    5 BEGIN
    6
    7 v_file_dir := 'PROC_PKG_FUNC';
    8
    9 FOR REC_OBJ IN
    10 (SELECT DISTINCT NAME,TYPE,DECODE(TYPE,'FUNCTION','FUNCTIONS','PACKAGE','PA
    CKAGES','PACKAGE BODY','PACKAGES_BODY','PROCEDURE','PROCEDURES','TYPE','TYPES','
    TYPE BODY','TYPES_BODY') v_file_dir
    11 FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER='FRISKDEVI41B'
    12 AND TYPE IN ('FUNCTION, PROCEDURE','PACKAGE','PACKAGE BODY','TYPE'))
    13 LOOP
    14 v_file := Utl_File.FOPEN(location => REC_OBJ.v_file_dir,
    15 filename => REC_OBJ.NAME || '.sql',
    16 open_mode => 'w',
    17 max_linesize => 32767);
    18 i_first_line := 1;
    19 FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_
    OBJ.NAME AND TYPE=REC_OBJ.TYPE AND OWNER='FRISKDEVI41B' ORDER BY LINE)
    20 LOOP
    21 IF i_first_line = 1 THEN
    22 Utl_File.PUT_LINE(v_file,'CREATE OR REPLACE ' || REPLACE(REC.TEXT,CHR(10),N
    ULL));
    23 ELSE Utl_File.PUT_LINE(v_file, REPLACE(REC.TEXT,CHR(10),NULL));
    24 END IF;
    25 i_first_line := i_first_line + 1;
    26 END LOOP;
    27 Utl_File.FCLOSE(v_file);
    28
    29 END LOOP;
    30
    31 END;
    32 /
    Procedure created.
    SQL>exec Get_Db_Ddl_Scripts ;
    PL/SQL procedure successfully completed.
    Thus the files are created in the location.
    now what i want to do is i want to read each file and run in my current schema to create these objects in my local scehma ,is that possible? Help required._

    ORCHYP wrote:
    once these files are written in respective folders, you can open them with utl_file('read') in current schema and very well you can execute them.
    Try it onceTry it as many times as you like, you won't execute the files with utl_file, that's for sure. ?:|
    Using something like DBMS_SCHEDULER you could issue a one off job for each script, as that package can call o/s commands.
    However, what's the point?
    You may as well, in the code above, just build up your DDL commands or whatever inside your code and, rather than write them out to scripts, use the EXECUTE IMMEDIATE command to execute the DDL against the database.
    Of course may not be the best thing to be doing, but we have very little information about what it is that is trying to be achieved, and no reason given why all the functions, packages etc. aren't just put together in a single script that is executed from the command line in the first place. Why try and write PL/SQL to do it?

  • How to include a html from different machine?

    I've tired the inculde tag, but it seem unable to inculde files from other machines...
    could anyone teach me how to do so?!
    thanks!!!

    Hi,
    I think you are using <%@include file="filename"%>. This mechanism is a bit more efficient (the inclusion is done at the time the JSP is being compiled), but is limited to including text files (the file is read, rather than being processed as an HTTP URL; so if you include, say, a CGI script, the contents of your CGI script are revealed in the JSP output: not useful!). The <jsp:include> can include a URL of any type (HTML, servlet, JSP, CGI, even PHP or ASP).
    Try with <jsp:include> to include files on the other machines.
    Hope this helps.
    With Regards
    Gayam_Slash

  • CS3: Any way to Batch convert files from different directories?

    Using CS3. I want to open a bunch of TIF files and re-save using different file options. The only way I know to do this is with File > Automate > Batch. But that only works if the destination folder for all files is the same. It's not.
    Ideally I would not need to first open the files in Photoshop. Perhaps something with Bridge will work. Tools > Photoshop > Image Processor looks promising. There's even an option called "Save in same location", which does not do what it says so is totally useless.

    >Bridge and Finder. They might both be running, but they are two programs that aren't Photoshop to do one simple thing Photoshop should do already by version 11.
    The whole point is that Bridge is supposed to be used as an integral part of the CS4 SUITE.
    I keep Bridge CS4 running at ALL times (it uses a minute amount of resources when it is just in standby mode) and I consider it to be an essential adjunct to Photoshop particularly if you deal with digital camera files.
    I use its "Get Photos from Camera" to download from my card reader in preference to Nikon's download program; and I open whole batches of RAW files for processing in Bridge-hosted ACR 5.2.
    ACR 5.2 also handles scanned Tiffs and JPEGs.
    And I use Bridge to output Web Galleries; attach files to e-mails; collect aliases of all the files of any kind (and from any folder) that are needed for a particular project into a single Collection: and generally to organize file storage throughout my System.
    The only thing that I can't yet do directly from Bridge is to burn a Collection to a CD or DVD.
    Hopefully, someone like David Franzen will create a Script to do that too?

  • How to generate trace file from different session?

    I have a cron job which starts several Oracle stored proc (Oracle 9.2). I want to generate a trace file when the job is running. I know I can use this alter session command before I start this job. But this is my session not the job session. So this command won't generate trace file for job's session.
    ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
    Appreciate any ideas.
    Thanks.
    S.

    Easiest way is to use database control/grid control - click trace session button!
    The 'old fashioned way is'
    begin
    DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(SID,serial#,TRUE);
    end;
    find sid and serial# in a select from v$session
    There are other ways too but this is probably the easiest.
    You'll need appropriate privileges to run this .
    Cheers,
    Harry

  • FILES FROM MULTIPLE DIRECTORIES

    Hi Experts,
                    I got a doubt here plz clarify it
        1.How can we pick files from multiple directories ? and all the files will have different  names?
                    Plz clarify this, good explanations willbe rewarded .
                                                                                    Regards,
                                                                                    Vinod.

    Hi Vinod Reddy,
    One way that i know to solve this prob is by using the 'File Name Masking'.
    This can be done with the sender channel, where you have to specify the
    source directory as <NOTHING>
    source file as <NOTHING>
    This gives you an advanced selection option, where you need to give the Source Directories along with the File name masks (the source files).
    Hope this may solve your problem.
    regards
    vinod v
    reward me if its helpful.

  • Send multiple files in different directories using Receiver File Adapter

    Hi Experts,
    I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
    Can anyne help me to send multiple files in different directories using receiver file adapter.
    Is it possible??
    Any help will be appreciated.
    Regards,
    Danish

    hi ,
    that is possiable without esr,
    we need to create one sender communication channel , in that  we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
    we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
    in receiver determination, provide multiple receivers
    In interface determination , provide * symbol for receiver communication components
    thanks,

  • How to pickup files from multiple directories

    Hi all,
    How to pickup files from multiple directories and send it to two different folders at target
    Ex:
    files\xi\us\US.txt
    files\xi\uk\UK.txt
    i need to pick up the above mentioned two files and send it to the following paths
    app1\files\us\download\US.txt
    app1\files\uk\download\UK.txt
    US.txt has to goto US folder and UK.txt has to goto UK folder only
    Regards

    Hi,
    To pick form multiple folders, select Advanced Mode for file selection in file adapter..
    there u can specify directory name/file names
    Refer
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    To put those files at multiple folders write a command line arguments for this.. go through this weblog...
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    XI/PI: Command line sample functions
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Hope this will help you....
    Regds,
    Pinangshuk.

  • How to configure a scenario which posts same file to different directories

    How to configure a scenario which posts same file to different directories of a receiving system?
    Consider an Idoc to file scenario where I have to post same file to two different directories but logical receiver system has to be same.

    Hi,
    You can try out like this: Using multiple receiver interfaces you can send it to multiple directories with the help of enhanced interface determination/conditions and with the help of multiple receiver communication channels.
    Another option is to copy the file from one target directory into another directory  with the help of Unix script by executing the same from the OS command level.
    One more option is to create a Java Server Proxy and inside the proxy, you can write java code to FTP into different locations.
    Hope this helps,
    Regards,
    Moorthy

  • How ATTACH multiple files from different folders in one ATTACH 'session'?

    Hi,
    In Mac Mail, I often have to attach 2 or 3 separate files, all from different folder locations on my hard drive.
    This requires clicking attach, selecting file 1 and clicking OK, which closes the Attach dialog.
    Then I have to do it again 2 times for each other file. oy.
    Is there a way to Highlight multiple files in different directories (ala Command-Select...which doesn't work) before selecting OK?
    OR
    I've found that I can DRAG a file from the Attach dialog into the email and the dialog will remain open, only the file is HIGHLIGHTED in the email and , hence, gets replaced by the next file I drag into the email (or select by the normal method)....
    Is there a way to drag that file#1 into the email and have it NOT remain highlighted, so that I can pick another file to add in addition to that one?
    Thanks!

    ShizzleFizzle wrote:
    Is there a way to Highlight multiple files in different directories (ala Command-Select...which doesn't work) before selecting OK?
    Have you tried dragging files from Finder windows into the mail message window?

Maybe you are looking for

  • Ipad 4th Gen not working at all

    Hi I have an iPad 4th Generation WI-FI and I got it less than 2 years ago and now it doesn't work at all. I will explain a bit more about what happened to it in more detail below. So I was taking photos with it and after I was done I turned it off or

  • Miro & migo

    Hi All, This is Thirupathi Rao. plse tell me if anybady what is the MIRO & MIGO and what is purpose of use. Regards, Thiru

  • Disable "Delete" button only at project definition level

    Dear Gurus, Is anybody have any idea regarding how to disable "delete" button at project definition level (and remain enabled for phases, tasks,...)? I tried it through Web dynpro application, but it got disabled for entire hierarchy. Regards, Ravind

  • Remap Home / PgUP / PgDwn / End Key Commands?

    Hey I'm having a problem with Dreamweaver CS3. I am using a MacBook running OSX 10.5.3, and in order to use Home, End, Page Up and Page Down in Dreamweaver, I have to hit a combination of Fn, Cmd and one of the Arrow keys, each corresponding to one o

  • Workflow of Service module

    Hi According to my client requirement two things are needed in service module: 1. Free Service (after sales) 2. Paid Service. Please explain the workflow of service. How this can be managed in service module? tHANKS