About header files in sunStudio C++

Please send the details about the header files in Sun Stdio C++.
In our college we are using some header files are not working like
"iostream.h".
Instead of this what header we have to use
Please send the the details as quickly as possible

The C++ Users Guide explains the sets of headers and libraries supplied with the compiler. Refer to the section on LIbraries.
To find all the Sun Studio documentation, point your browser to
file:///<install-dir>/docs/index.html
where <install-dir> is the base directory where Sun Studio is installed. The default location is /opt/SUNWspro
Or you can go to here
http://docs.sun.com/app/docs/prod/studio.prod
to find documentation for all releases of Sun Studio

Similar Messages

  • A question about /usr/include/sys/select.h header file

    good day! i hope i can get some help about this and i would be very grateful if my question will be answered. i have a question regarding the select.h header file that we include in our programs when we use the select(3C) function.
    * Select uses bit masks of file descriptors in longs.
    * These macros manipulate such bit fields.
    * FD_SETSIZE may be defined by the user, but the
    * default here should be >= NOFILE (param.h).
    29 #ifndef FD_SETSIZE
    30 #define FD_SETSIZE 1024
    31 #endif
    its says here in the header file that the value of FD_SETSIZE may be defined by the user and i need to know how. i've already tried declaring a constant at the beggining of the program but it didn't work...
    example:
    #undef FD_SETSIZE
    #define FD_SETSIZE 2048
    the FD_SET macro generates an error if a value larger than 1024 is passed from in the first argument. i need to increase its value in order for me to wait for more than 1024 socket descriptors on select function. how can i increase or modify its value? thanks in advance...

    AFAIK, the only way to change the FD_SETSIZE value is by building your own version of the libc.a and linking it statically to your executable. Not good at all IMHO.
    The sources of Solaris 8 contain the implementation of select(3C) with both standard and 'large' (64K) FD_SETSIZE.
    AFAIK, 64-bit version of the libc.so contains the 64K-descriptors version of the select(3C), so you may consider building your application with -xarch=v9 flag to get 64-bit application...
    As for poll(2) - there is a manual page (man -s 2 poll) and some notes in the Answerbook. poll(2) is the actual system call that is used by select(3C), which is an interface function, so there is no functional difference between these two.
    There is a potential problem with portability of your code if you are using poll(), but it looks like you have no choice... sorry about it...

  • A questions about /usr/include/sys/select.h header file

    good day! i hope i can get some help about this and i would be very grateful if my question will be answered. i have a question regarding the select.h header file that we include in our programs when we use the select(3C) function.
    * Select uses bit masks of file descriptors in longs.
    * These macros manipulate such bit fields.
    * FD_SETSIZE may be defined by the user, but the
    * default here should be >= NOFILE (param.h).
    29 #ifndef FD_SETSIZE
    30 #define FD_SETSIZE 1024
    31 #endif
    its says here in the header file that the value of FD_SETSIZE may be defined by the user and i need to know how. i've already tried declaring a constant at the beggining of the program but it didn't work...
    example:
    #undef FD_SETSIZE
    #define FD_SETSIZE 2048
    the FD_SET macro generates an error if a value larger than 1024 is passed from in the first argument. i need to increase its value in order for me to wait for more than 1024 socket descriptors on select function. how can i increase or modify its value? thanks in advance...

    AFAIK, the only way to change the FD_SETSIZE value is by building your own version of the libc.a and linking it statically to your executable. Not good at all IMHO.
    The sources of Solaris 8 contain the implementation of select(3C) with both standard and 'large' (64K) FD_SETSIZE.
    AFAIK, 64-bit version of the libc.so contains the 64K-descriptors version of the select(3C), so you may consider building your application with -xarch=v9 flag to get 64-bit application...
    As for poll(2) - there is a manual page (man -s 2 poll) and some notes in the Answerbook. poll(2) is the actual system call that is used by select(3C), which is an interface function, so there is no functional difference between these two.
    There is a potential problem with portability of your code if you are using poll(), but it looks like you have no choice... sorry about it...

  • Including Header files

    Hi
    Am a mainframe guy and new to these stuffs.
    Now ,I want to compile a C++ program in Sunstudio.
    My question is how & where to add the header files ?
    What is the extension to be used for the header files ?
    Please someone help me in this regard.

    [I had replied to this yesterday but it didn't appear to show up in the thread]
    The header file is added to the 'Header files' in the same project For Sun Studio, I am pretty sure that the header files listed in the project
    is not used by the compiler to find the header files.
    That list of header files is merely a convience for the programmer
    as a reference and to quickly find and open header files used in the project.
    You need to tell the IDE which directories to search for header files
    (that are not standard header files)
    I am presuming that the header file(s) the compiler is complaining about is not a standard library header file,
    but instead is a header file associated with the source code you are compiling or are associated with
    a 3rd party library required by the program.
    The #include semantics, as ralphw mentioned, can be a little complex.
    As a quick follow up to ralphw's response
    generally #includes of the form
    #include "foo.h"
    indicates that the header file is in the same directory as your project source files.
    Normally the compiler can find this file with some simple seach heuristics so
    I suspect the offending include line is of the form:
    #include <foo.h>
    The <> brackets indicates that the header file is in a directory to be specified
    in one of the listed include directories.
    Include directories may be intrinsic to the compiler implementation
    such as standard libraries and/or libraries added by the compiler vendor;
    or they may be header files for 3rd party libraries or your own libraries
    stored in some directory other than the application program you are compiling.
    For 3rd party libraries or your own libraries, provide a list of
    directories to seach for included header files.
    for command line mode, in almost all c/c++ compilers these directories are listed with
    the -I command line argument.
    In SunStudio 12, you list the include directories in
    your project properties / Parse configuration / Sun C++ compiler / General / Preprocessor definitions
    If you have further questions on this, it would be helpful to know
    if you are attempting to compile some preexisting code
    or are you creating code from scratch.
    (It sounds like you are compiling preexisting code that
    presumably has been compiled correctly in some other implementation
    and are trying to port it to Sun Studio.
    If this is the case, it sounds like you simply need to add the
    path of the directory containing the offending header file to
    this list of include directories.)
    It would also be helpful to know the fully qualified
    file name of the offending .h file,
    and the form of the #include line in the file that is being compiled.
    If the #include line is of the form
    #include <dir/foo.h> then you need to add the
    path of the 'dir' parent directory to the include directories list.

  • How can I use a dll if I dont have a header file

    I'm not sure if I'm even trying the possible here as I have searched and not been able to find much at all.  However I figured it was worth asking here.
    I have access to several dll's used by a program, I need to open a file using the program (for some reason it is completely non responsive unless you open it "within" the program itself) and so decided to browse the .dll files included.  Ive found a few functions which may carry out the function I need.  Is there a way of figuring out the inputs/outputs if I don't have documentation or a header file?
    This is the next stage in a huge project I am working on at the moment and I've been banging my head against the wall all day trying to figure this out.
    Thanks in advance for any help
    Rik
    That glass?
    Thats glass is neither half full or half empty....
    Its twice the size it needs to be

    Yes, that makes sense. It also means that what you are trying to do is not likely to work. You have no way of knowing what the program does when opening the file, so guessing at using the DLLs is purely a shot in the dark without even knowing where the dark is. Even if you could find the function (assuming it's just one) that loads a file, how is the program supposed to use it now? That function has to be called from within the program. When you call it from LabVIEW you are not sitting inside the program's memory space, so it has no way of knowing about the file.
    I would suggest, instead, to see if the program accepts command-line parameters. For example, does it accept a name of a file to open as part of launching it from the command line? If not, then you may need to resort to trying to control it via automation. If it has no built-in automation then you need to resort to using the OS to make pretend you're clicking buttons and typing text. This has come up many times before, and there have been numerous posts on this, so please do a search on controlling an external program from LabVIEW within this forum. You can call the Windows API functions to move the mouse to a specific location and click the button as well as typing text, or you can use third-part automation tools. One that I have used successfully is AutoIt. The search I indicated will yield other suggestions. 

  • 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.

  • 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.

  • VS2010: Why does my C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include does not get all the needed header files?

    Hello,
    I have installed VS2010 Professional. I have done a full install. The I install the 2010 redistributable and 2010 SP1. So I think I have installed all the needed products. But my include files has only 3 files :(. anmintrin.h, srv.h, wmiatlprov.h. My colleagues
    who have installed the same three products have some 200 header files. My guess these header files are coming from some SDK or so. I have 5.0, 6.0A, 7.0A. 7.1A, 8.0, 8.0A SDKS installed. What am I missing? 
    Please check this http://stackoverflow.com/questions/13656856/cant-get-visual-studio-c-include-file-excpt-h-to-get-installed and there the person tells to practically remove all and install all and another answer says just copy it. My hope is Microsoft
    might have a more logical and technical answer than doing something blindly without rhyme or reason
    A clear cut answer might help the community. 
    thanks
    ananda

    Hi Ananda Vardhana,
    What about your issue now?
    If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.
    If you did not, whether you can provide us more information as Barry said for resolving this issue?
    Best regards,
    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.

  • JNI generated header file does not match the class file

    We have had a JNI project for many years and all has been fine. Within our libraries we have several classes that have inner enum classes.
    Recently we have moved to JDK1.7. Up to now when JNI generated the methods where the signature used the inner enum class, and it was an oveloaded method, we would get something like the following as the signature:
    Java_PackageName_ClassName_methodName_OuterClass_00024InnerEnum_2
    And the class file result of the build would look like the following:
    methodName(OuterClass$InnerEnum)
    Since we have moved to JDK 1.7 the header file looks like the following:
    Java_PackageName_ClassName_methodName_OuterClasss_InnerEnum_2
    The class file is still the same, and because of that when we run the program we get an UnsatisfiedLinkError. I understand that this error is because the VM cannot find the implementation. So why JDK 1.7 generates a header file that does not match the class file?
    Thank you in advance.

    I don't have 1.6 to verify but your statements about what is generated for 1.7 for the header appear correct.
    The 000024 represents the '$' and for 1.7 the inner class is still named using '$'. So for example after compiling in 1.7 the inner class file is named the following...
    MyClass$InnerEnum.class
    So a one to one conversion should have kept the 000024 (presuming it does in fact do it that way in 1.6.)
    You might want to look at the release notes for 1.7.
    If you need a solution you could add a post javah step that renames the file.

  • Gettin header files for embedded sql

    Sir,
    iam acutally looking for header files needed used in embedded sql,which is used pro c* compiler .So i request you to send me a link of these files,as iam tying to learn this topic.these files are not generally available in a genaral C compiler.
    So please send me reply about this and also if this particular language/techn is still being used which may help me to improve my knowledge

    I am not a Cobol programmer, but I worked several years a Pro*C programmer, this precompiler issue looks very similar to others I have several times faced, when I compiled a pro*C program on different platforms, the makefile had to be tailored to fit the particular platform paths. May be this is happening to you, you should verify the compilation script and ensure the required libraries are visible.
    ~ Madrid

  • Missing header files when importing a shared library with labview 8.6?

    Hi all,
    I want to import a .dll into my .vi program but I am not able to do it...
    I have created the dll  following the ni website tutorial
    http://zone.ni.com/devzone/cda/tut/p/id/3303#toc2
    Once the dll has been created, I have tried to import it with
    Tools-Import-Shared Library(dll)
    After parsing the header file appears an error like this one:
    void __cdecl Zdmt(LVBoolean *stop, double P, char channelName[],
        TD1 *errorIn, TD14 *FFTOptions, TD12 *Calibration, char FileName[],
        int32_t minRecordLength, TD26 *InstrumentHandler, LVRefNum sessionRefArray[],
        LVRefNum *queueIN, TD1 *errorOut, LVBoolean *averagingDone,
        HWAVES LastRecordFetched, TD24 *Impedance, TD17 *ColeColeCluster,
        TD18 *FFTcluster, TD5 *InstrumentHandleOutputCluster, LVRefNum *queueOut,
        int32_t *Acquired, TD6 *FreqTimeInfoCluster, double *averagesCompleted,
        int32_t len);
    The following symbols are not defined:
    LVBoolean; int32_t; LVRefNum;
    Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add predefined symbols. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
    The following header file was not found in the specified header file or one of the referenced header files:
    -  extcode.h
    To fix, click the Back button to go to the previous page and add the header file path to the Include Paths list.
    I have replaced the first line #include "extcode.h" of the dll header file for #include "C:\Program Files\National Instruments\LabVIEW 8.6\cintools\extcode.h" that is the full path where the header file is located. However, new libraries seems to be missed:
    -  stdint.h
    -  MacTypes.h
    Does anybody know what I have to do??
    Any help will be really appreciated,
    Regards,
    Benjamin

    If you use any of the LabVIEW cintools headers, they reference other headers too. The import wizard is written in a way that it simply skips parsing datatypes that can not be resolved due to missing header files.  If your functions you want to import references such datatypes then you get an according error about any include files the wizard could not load, otherwise not. The wizard can not know which of the missing header files is the problem since it obviously doesn't know what would be in those header files.
    The LabVIEW cintools headers are multiplatform, meaning they evaluate various compiler predefined defines to determine which platform they are included in. The import library wizard does not define any specific defines, since it is not really a compiler. So you have to define them. And they get adapted with each new LabVIEW version to support new compilers and compiler versions, so the defines described in the link in the first post do not have to be correct for cintools headers in newer LabVIEW versions.
    All in all writing DLLs that interface to LabVIEW cintools headers should not be done by writing them and then importing them using the wizard but instead you should write the VI and create the Call Library Node, then let LabVIEW create a template C file from the context menu of the Call Library Node and copy that into your C sources and fill in the functions from there.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • X11 Header files

    My recent install of Solaris10 and sunstudio did not seem to install the X11 header files needed to compile some applications. In particular X11/Shell.h and X11/Xatom.h are not there. What package do these live in?
    More generally, is there some way to find out what a package contains or to query which package supplies which modules, files, etc?

    It's always been tough question; I usually log in to other Solaris system and do
    bash-3.00#  pkgchk -l -p /usr/include/X11
    Pathname: /usr/include/X11
    Type: symbolic link
    Source of link: ../openwin/include/X11
    Referenced by the following packages:
            SUNWxwhl      
    Current status: installed

  • Place function in header file?

    Hello, again.
    Suppose I have a piece of code that I know I am going to be using very often. Obviously, the logical thing to do is place it in a function. And, suppose that I know I'm going to be calling that function often, and in a lot of different projects. How can I best make it so that I don't have to declare and define the function in every file in every project that I want to use this function in?
    Would I place the function in a header file, and then use the #include preprocessor directive to include the .h file in every file I want to use the function in? If so, why couldn't I just store the function in a .c/.cpp file? What does a header file offer over a .c or .cpp file -- why use one over the other?
    Also, where do I go to create the header file? If I go to File > New File and select header file, then it creates it as a file within the project that I have open at that moment, and I'm going to want to use the file in other projects. Is there somewhere I can save the header file outside of any specific project, so that I can include it in any project I want?
    Thanks.

    Tron55555 wrote:
    So, technically, I could define the entire function in the header file, even without declaring it as inline, and I wouldn't have to define it in a source file?
    Nope. You'll get linker errors, or at least warnings, about the function being defined twice.
    1.) Why define it in a source file in the first place? Why not always define it in the header file? I can imagine there's obviously a very good reason for this -- I'm just curious what it is.
    Code bloat and the sheer inefficiency of having the same code duplicated everywhere.
    2.) You said that if the function is defined in the header file instead of a source file then it is treated as a macro and the whole function is picked up and dropped in your code wherever it is called. This sounds like the same thing as an inline function, so if you did define the entire function in the header file, what would be the difference between defining the whole thing in the header file using the inline keyword, versus defining the whole thing in the header file without the inline keyword?
    Well, it is an inline function. You must use the inline keyword.
    3.) Finally, if I did decide to define the entire function in the header file and not use a source file, would I still need to write the function signature as well, or just the definition?
    Just the definition.

  • Virtualbox - install build and header files for your current kernel

    I have initially installed virtualbox before upgrading the Arch
    Also took backup of the kernle before upgrading since kernel26 2.6.30 is having problem with virtualbox
    After upgrading I have configure the grub to use the previous kernel i.e 2.6.28
    Later  installed xorg and want to install the video drivers from VBox additions
    but running
    sh VBoxLinuxAdditions_x86.run
    i get the following
    install build and header files for your current kernel
    The current kernel version is 2.6.28 Arch
    What are the build and header files I have to install or search with pacman
    And since i have upgraded the system will I able to look up the header and build files needed for kernel 2.6.28

    dmartins - he's talking about his kernel's headers, not the kernel-headers package - they are two very differnet things.
    sant527 - when you backed up the 2.6.28 kernel, did you remember the files in /usr/src/linux-2.6.28-ARCH/ ? They're what VBox is looking for.

  • [SOLVED] Where do header files come from?

    I'm a little confused about which files get included when compiling a program in C.
    I made a file named "screen.h". It's pretty obvious that the compiler is trying to use a different "screen.h" than mine, especially since it compiles fine when I rename my file to "screenblarg.h".
    I am making a video game using the Allegro Game Library. Here is the command I use to compile the source files:
    gcc -O2 -Wall -Wextra -ansi -pedantic -c filename.c -I/usr/include
    I "properly" include the necessary files, using quotes and angled brackets, for example, in "main.c":
    #include <allegro.h> /* System header */
    #include "screen.h" /* Local header */
    I'm especially confused because there is no "screen.h" in "/usr/include".
    Does this behavior make sense to anyone? Please let me know if it would help to see the actual code. Thank you!
    Last edited by drcouzelis (2010-08-11 02:00:11)

    tavianator wrote:
    Use gcc -v to see where it's searching for include files.
    Also, -I/usr/include is unnecessary, as gcc will search there for includes by default.
    Thank you for your response. I don't see anything in the output of "gcc -v" that would say where it is searching for header files. (it's from the standard Arch Linux package, by the way)
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: ../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
    Thread model: posix
    gcc version 4.5.0 20100610 (prerelease) (GCC)
    As for including "-I/usr/include", I understand that it's not necessary. It comes from the Allegro command "allegro-config --cflags" in my makefile, which I added to make compiling my program a bit more portable.
    There are two other files on my computer named "screen.h". I tried renaming them, but my program would still not compile.
    A search on the Internet doesn't say anything about a common "screen.h" file in Linux.
    Does the compiler "see" header files (such as a "screen.h") in the libraries that are in "/usr/lib"? Or something? O_o

Maybe you are looking for

  • Upgraded to new iTunes....now will not launch

    Hello all. this AM I upgraded to the new version of iTunes. Big mistake. Now the silly thing won't even open...no error message, no nothing--just an hourglass and then nada. So, I read around on the boards and tried the Quicktime install as a standal

  • Setting up my msn account with mail

    i'm a new mac user and i read posts to set up my msn account on mail. but it keps asking for my password and will not sign me on for mail. i don't know what i'm doing wrong can someone help me? my searches are bringing me in circles

  • Why use OPEN before using LOB ???

    For example : when I use APPEND function like this DECLARE sour_clob CLOB:='APPENDING CONTENTS'; dest_clob CLOB; BEGIN SELECT c_lob INTO dest_clob FROM lob_tbl FOR UPDATE; DBMS_LOB.APPEND( dest_clob , sour_clob ); COMMIT ; END; since LOB is not open

  • Bluetooth issue after IOS5 upgrade

    I just upgraded from IOS4 to IOS5 on iPhone 4.  With IOS4, my contacts are sorted and displayed as LAST, FIRST both on the phone and on the car display (BMW 328i).  After the IOS5 upgrade, the contacts are still displayed LAST, FIRST on the phone but

  • Can not update from Aperture 3.1.2 to 3.1.3

    Told to update this application to sign into account used to purchase it.  Check with emails, and emails corresponde with normal mac account email.