Linker error:  ild: (undefined symbol)

I am porting a large pack of C++ from AIX to Solaris. All the modules now passed compilation. But the linker (incremental loader) complains about undefined symbol, such as
ild: (undefined symbol) __rwstd::__rb_tree<CString,std::pair<const CString,int>,__rwstd::__select1st<std::pair<const CString,int>,CString>,std::less<CString>,std::allocator<std::pair<const CString,int> > >::iterator __rwstd::__rb_tree<CString,std::pair<const CString,int>,__rwstd::__select1st<std::pair<const CString,int>,CString>,std::less<CString>,std::allocator<std::pair<const CString,int> > >::erase(__rwstd::__rb_tree<CString,std::pair<const CString,int>,__rwstd::__select1st<std::pair<const CString,int>,CString>,std::less<CString>,std::allocator<std::pair<const CString,int> > >::iterator,__rwstd::__rb_tree<CString,std::pair<const
CString,int>,__rwstd::__select1st<std::pair<const String,int>,CString>,std::less<CString>,std::allocator<std::pair<const CString,int> > >::iterator) -- referenced in the text segment of ../Release/solaris/libSpiderWeb.a(SpiderCommand.o)
ild: (undefined symbol) void std::list<const Process*,std::allocator<const Process*> >::__deallocate_buffers() -- referenced in the text segment of ../Release/solaris/libDragline.a(SystemScope.o)
I did not explicitly use those functions for sure. However, when I link a small test program using std::list and/or std::map which had at least __deallocate_buffers after template instantiation, the linker did not complain.
Any insighgt? What could be the problem and what is the fix?
BTW I am on SunOS 5.6 sun4u sparc SUNW,Ultra-2 and use compiler Sun WorkShop 6 2000/04/07 C++ 5.1.
Thanks a lot!
Lan

There is no Solaris 6.2. To find the Solaris version, run the command
uname -a
Probably you mean Sun Workshop (or Forte Developer) 6 update 2. (The name of the product changed mid-stream, from "Sun Workshop" to "Forte Developer", and now is "Sun Studio".)
To find the compiler version, run the command
CC -V
For Workshop 6u2, the CC version is 5.3.
For old compiler versions like this, problems with missing template definitions can usually be fixed by clearing the template cache and rebuilding. To clear the template cache, you can just remove the directory SunWS_cache, or more conservatively, run the command
CCadmin -clean
There will be a cache directory in every directory where you create .o files. You need to clean all of them.
Starting with Sun Studio 8 (C++ 5.5) in 2003, the compiler no longer uses a template cache by default. These kinds of problems no longer occur.
You really should stop using the old compiler, and get a current one. The later compilers run faster, generate code that runs faster, are more standard-conforming, support modern hardware, and have superior program development tools (compiler, debugger, performance analyzer, thread analyzer). Best of all, the current compilers are completely free for all uses. The only license is the license you click to accept when you download the product.
If you are running on Solaris 8, get Sun Studio 11 here:
[http://developers.sun.com/sunstudio/products/previous/11/index.jsp]
If you are running on Solaris 9, Solaris 10, Solaris Express, or Open Solaris, get the current release, Sun Studio 12:
[http://developers.sun.com/sunstudio/]

Similar Messages

  • Solaris link error - cout undefined symbol

    I am using the Forte 6 C++ compiler, but instead of using the built-in roguewave STL library I am using STLPort 4.5.1 for performance reasons. If I compile my application using the roguewave STL it links ok, but when I use the STLPort I received an undefined symbol for cout.
    Ideas how I can get around this?
    Thanks,
    Sean

    Are you sure you posted the entire output of the linker? It doesn't look like you have.
    The error you posted is:
    Undefined first referenced
    symbol in file
    ISymbolTable::__
    It then goes on to state that the file that needs this symbol (the file that first references this missing symbol) is /lib/cxx//libMyBusinessObjects.so.
    Now, what I don't get is the symbol itself. what is ISymbolTable::__ ? That's just plain whacky.
    Is libMyBusinessObjects.so your library?
    Anyhow, to fix these types of errors, it is typically an issue of adding another lib or .o to you link list in the Makefile. But, first, you have to make sense of the symbol that is "missing".
    If you provide more data, it might help in resolving this...
    -- jrj

  • Error compiling "Undefined symbols for architecture armv6:"

    Hey, I seem to be getting errors like this a lot... I only just started making apps yesterday, so they are all still very basic, but I was wondering if I am doing something wrong when I import frameworks?
    This may be caused from something else entirely, but this is what I seem to think is causing it...
    Basically the error I'm getting is:
    Undefined symbols for architecture armv6:
    "_kUTTypeImage", referenced from:
    -[CameraViewController(CameraDelegateMethods) imagePickerController:didFinishPickingMediaWithInfo:] in CameraViewController.o
    -[CameraViewController(CameraDelegateMethods) startCameraControllerFromViewController:usingDelegate:] in CameraViewController.o
    "_kUTTypeMovie", referenced from:
    -[CameraViewController(CameraDelegateMethods) imagePickerController:didFinishPickingMediaWithInfo:] in CameraViewController.o
    "_OBJC_CLASS_$_CameraViewController", referenced from:
    objc-class-ref in CameraViewController.o
    l_OBJC_$_CATEGORY_CameraViewController_$_CameraDelegateMethods in CameraViewController.o
    ld: symbol(s) not found for architecture armv6
    collect2: ld returned 1 exit status
    As you can probably tell, I am trying to make a very simple camera app. Most of the code is copied and pasted straight from apple's site.
    If it would help I can put the full source code I have so far on these forums, just let me know.
    Thanks for any help!

    I've got this error while importing a project from XCode 3 to XCode 4
    A simple workaround which has worked for me was :
    1) Start a new project from scratch in XCode 4 using a template... I know, it should be tedious... ;-(
    2) You should change the build settings  « Architectures » of your project (under TARGETS) to compile with « armv6 » instead of the default value which is « Standard (armv7) »
    Double click « Standard (armv7) » in the « Architectures » setting 
    Add « armv6 » in the popup after clicking « + » button in the bottom-left of the popup

  • I am getting an linker error LNK2001 : unresolved symbol _main while compiling Microsoft c code

    I am writng a simple application in C language for communicating with GPIB. when I compile the c file I am getting a linker error
    LIBC.lib(ctr0.obj): LNK2001 error: unresolved sysmbol _main
    I compile the application in the dos window using the command
    cl gpibApplication.c gpib-32.obj.
    Could anyone tell me how to remove this error

    Hello-
    It sounds like the main function is missing from the gpibApplication.c file. Be sure that the following function is somewhere in the code:
    int main (int argc, char *argv[])
    Also, note that this function is case sensitive, so be sure main is not capitalized.
    Randy Solomonson
    Application Engineer
    National Instruments

  • RegExpr_FindPatternInText Link Error

    I'm trying to use function RegExpr_FindPatternInText.  I have included regexpr.h at the top of my source file, and I have regexpr.fp loaded and added to my project.  The program compiles just fine, but won't link.
    The link error is       Undefined symbol '_RegExpr_FindPatternInText@36 referenced in "main_updated.c".
    What else must I do to get the program to link this function in?
    Thanks.

    If you have moved regexpr.fp ro regexpr.obj after you added it to your project, it can cause confusion when CVI tries to link. You can load the fp file from either the toolbox directory or you can copy both it and the obj file to your project directory and then load it from there. Once you load the fp and your project links correctly, then add the instrument to your project so that the relationship is saved with your project.
    National Instruments
    Product Support Engineer

  • Ild: (Performing full relink) internal free space in undefined symbol error

    I am using Sun Sparc C++ 5.4 compiler to compile some code.
    I had some issues with Makefile which I have resolved successfully for test program, which has only one string and print statetments.
    When I compile my program error_log.C program using Makefile, I am geting following errors.
    Same file for test program works ok.
    Any suggestions/pointers etc are much appreciated.
    Thanks
    Ravi
    ERRORS:
    ==================================================================================
    /opt/SUNWspro/bin/CC -g -compat=4 -V - YP,/ford/thishost/u/rbhave/mqrouter/lib:/usr/lib:/opt/SUNWspro/prod/lib -I/ford/thishost/u/rbhave/mqrouter/include -c error_log.c
    CC: Forte Developer 7 C++ 5.4 2002/03/09
    ccfe: Forte Developer 7 C++ 5.4 2002/03/09
    /opt/SUNWspro/bin/CC -g -compat=4 -V -YP,/ford/thishost/u/rbhave/mqrouter/lib:/usr/lib:/opt/SUNWspro/prod/lib -I/ford/thishost/u/rbhave/mqrouter/include error_log.o -o error_log -lXm -lXt -lX11 -lstring -lipc -lutils
    CC: Forte Developer 7 C++ 5.4 2002/03/09
    CClink: Forte Developer 7 C++ 5.4 2002/03/09
    CC: Forte Developer 7 C++ 5.4 2002/03/09
    ild: (Performing full relink) internal free space in output file exhausted (sections)
    /opt/SUNWspro/bin/../prod/bin/c++filt: Forte Developer 7 C++ 5.4 2002/03/09
    ild: Forte Developer 7 Incremental Linker 4.0 2002/03/09
    ild: Forte Developer 7 Incremental Linker 4.0 2002/03/09
    ild: (undefined symbol) ErrLog_c::ErrLog_c(void) -- referenced in the text segment of error_log.o
    ild: (undefined symbol) ErrLog_c::SetFileOutput(char*) -- referenced in the text segment of error_log.o
    ild: (undefined symbol) operator <<(ostream&, const String&) -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libutils.a(ini_file.o)
    ild: (undefined symbol) operator <<(ostream&, const String&) -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libutils.a(datetime.o)
    ild: (undefined symbol) IsSocketUsed(const char*, const char*) -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_recv.o)
    ild: (undefined symbol) IsSocketUsed(const char*, const char*) -- referenced in the text segment of error_log.o
    ild: (undefined symbol) operator >>(istream&, String&) -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libutils.a(general.o)
    ild: (undefined symbol) setsockopt -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_recv.o)
    ild: (undefined symbol) recv -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_recv.o)
    ild: (undefined symbol) bind -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_recv.o)
    ild: (undefined symbol) socket -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_dgram.o)
    ild: (undefined symbol) ErrLog_c::Rename(const ErrLogMesg_t&) -- referenced in the text segment of error_log.o
    ild: (undefined symbol) sendto -- referenced in the text segment of /ford/thishost/u/rbhave/mqrouter/lib/libipc.a(socket_dgram.o)
    ild: (undefined symbol) ErrLog_c::~ErrLog_c(void) -- referenced in the text segment of error_log.o
    *** Error code 5
    make: Fatal error: Command failed for target `error_log'
    ==================================================================================

    Try rebuilding with -xild=off to eliminate ild from the process.
    If it still doesn't link, delete the most recent .o files and try again to see how it goes.
    - Rose

  • Missing prototype and Undefined Symbol errors

    So, I am using an Opal Keyy XEM3005 board.
    Depending on the documentation I read, this board has a native ANSI C interface with a C++ wrapper.
    In their forums, they say to rename the ".cpp" file to "c", and then go forward with calling the default constructor & keep track of the pointer.  Their functions are all in an externally loadable DLL.
    Well and good.
    Their API documentatin is available here:  http://www.opalkelly.com/library/FrontPanelAPI/
    I have written a REALLY simple app to ease my way in - it does nothing more than allow the user to throw a switch, and when this happens, it goes off to connect to the board:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #include <cvirte.h>
    #include <userint.h>
    #include "Try1.h"
    #include "XEM.h"
    #define _WIN32_WINNT 0x0501
    //#define _WIN32
    #include <windows.h>
    static int panelHandle;
    static okFrontPanel_HANDLE    XEM_Device;
    int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpszCmdLine, int nCmdShow)
    if (InitCVIRTE (hInstance, 0, 0) == 0)
    return -1;    /* out of memory */
    if ((panelHandle = LoadPanel (0, "Try1.uir", PANEL)) < 0)
            return -1;
        DisplayPanel (panelHandle);
        RunUserInterface ();
        DiscardPanel (panelHandle);
        return 0;
    int CVICALLBACK Connect (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
        int    Value = 0;
        switch (event)
            case EVENT_COMMIT:
                GetCtrlVal(PANEL, PANEL_CONNECT_SWITCH, &Value);
                SetCtrlVal(PANEL, PANEL_CONNECT_LED, Value);
                if( Value )
                    XEM_Connect(XEM_Device);
                else
                    XEM_Disconnect(XEM_Device);
                break;
        return 0;
    int CVICALLBACK Quit (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
        switch (event)
            case EVENT_COMMIT:
                QuitUserInterface (0);
                break;
        return 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This, of course, works fine by itself (with empty _Connect() and _Disconnect() functions)
    I then started working with the XEM_Connect function.
    The first step is to run their LoadDLL function as such:
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        return XEM_SUCCESS;
    And this would compile and run just fine.
    Now, when I added the functions to start trying to get info about the device, I started getting "missing prototype" errors.
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        //    Find out how many devices are attached
        XEM_Device = okFrontPanel_Construct(  );
    //    XEM_Device = okCFrontPanel( void );
    //    NoDevices = GetDeviceCount( );
        printf("%d OK devices attached\n", NoDevices);
        //    Call the contructor?    
    //    okCFrontPanel ();
        return XEM_SUCCESS;
    Now, I searched the forums and found the bits about adding #define _WIN32_WINNT 0x0501 prior to inclusion of windows.h.  Did that.  No joy.
    Then I searched some more and found the bit about changing the build options to uncheck the "prototype required" flag.
    Done.
    This seemed to work at first (the above code could be built with no errors, and appeared to run).
    So I thought maybe I had it, and added the next line, so:
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        //    Find out how many devices are attached
        XEM_Device = okFrontPanel_Construct(  );
        OpenBySerial( XEM_Device, "UaLgzvVpBJ" );
    //    XEM_Device = okCFrontPanel( void );
    //    NoDevices = GetDeviceCount( );
        printf("%d OK devices attached\n", NoDevices);
        //    Call the contructor?    
    //    okCFrontPanel ();
        return XEM_SUCCESS;
    Now it doesn't complain about no prototypes (duh), but instead I get linker errors:
        Undefined symbol '_OpenBySerial@0' referenced in "XEM.c".
    So, dredging through the .h and .c files, I found a couple of things:
    in the okFrontPanel.c file I found the following:
    okDLLEXPORT ok_ErrorCode DLL_ENTRY
    okFrontPanel_OpenBySerial(okFrontPanel_HANDLE hnd, const char *serial)
        if (_okFrontPanel_OpenBySerial)
    ;  return((*_okFrontPanel_OpenBySerial)(hnd, serial));
        return(ok_UnsupportedFeature);
    In the okFrontPanel.h file I found:
    and also:
    okDLLEXPORT ok_ErrorCode DLL_ENTRY okFrontPanel_OpenBySerial(okFrontPanel_HANDLE hnd, const char *serial);
    So, I see them in the .h & .c files, but the linker is bombing out.
    I smell a problem with actual code to link being in the DLL...  How do I resolve this, any ideas?  Or am I doing something so stupidly (and obviously) wrong that I'm being blinded to it?

    Hi tomii,
    My suspicion is that these issues are due to using a C++ dll in a C environment. There are inherent challenges with performing such an operation as you have to make sure all your parameters and settings are correct.
    I also could not find the documentation that the Opal Kelly dll is ANSI C but it sounds like you can use this in C with some reconfiguration. I would recommend using their forums to get more information on what steps need to take place to get things working in ANSI C.
    From the information you provided, I did find some resources on the missing prototype error and undefined symbol issue with the linker.
    For the missing prototype I found a thread of someone actually using LabWindows and seeing this compiler error you may want to look at
    http://bytes.com/topic/c/answers/695019-missing-prototype
    I found a few cases where using a function definition of int func(void) removes such issue when int func() does not.
    Another link I found that may be worth a look can be found at http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
    It gives some good pointers to mixing C and C++ code. Some of it may be applicible in your case.
    And, a resource for your undefined symbol linking issue.
    http://www.cprogramming.com/tutorial/compiler_linker_errors.html
    Hopefully these resources will give some context for getting things compiling and working with your dll.
    Good luck!
    James W.
    Applications Engineer
    National Instruments

  • Linking Errors with rwtools7.so in C++ v6.2.p2

    Hi ,
    We are migrating our application from c++ 4.2 to 6.2.p2 and Sol 2.6 to Sol 8.
    we are using the option -compat = 4 for backward compatibility. and used -library=rwtools7 and
    ' -lrwtool' is also a prameter while liking ..
    while linking we are getting the below erros ...
    ild: (undefined symbol) __rtaccess(streambuf&) -- referenced in /sbcimp/run/tp/sun/SUNWspro/v6.2.p2/lib/rw7/CC4/librwtool.so
    ild: (undefined symbol) __rtaccess(ios&) -- referenced in /sbcimp/run/tp/sun/SUNWspro/v6.2.p2/lib/rw7/CC4/librwtool.so
    ild: (undefined symbol) type_info::__vtbl -- referenced in /sbcimp/run/tp/sun/SUNWspro/v6.2.p2/lib/rw7/CC4/librwtool.so
    [Hint: try checking whether the first non-inlined, non-pure virtual function of class type_info is defined]
    ild: (undefined symbol) __rtaccess(unsafe_ios&) -- referenced in /sbcimp/run/tp/sun/SUNWspro/v6.2.p2/lib/rw7/CC4/librwtool.so
    ild: (undefined symbol) __RT_CLASS::__vtbl -- referenced in the text segment of sun5/CASmfFile.o
    [Hint: try checking whether the first non-inlined, non-pure virtual function of class __RT_CLASS is defined]
    ild: (undefined symbol) __RT_CLASS::__vtbl -- referenced in the text segment of sun5/DtObj.o
    [Hint: try checking whether the first non-inlined, non-pure virtual function of class __RT_CLASS is defined]
    ild: (undefined symbol) __RT_CLASS::__vtbl -- referenced in the text segment of sun5/CrestMsgRcvHandler.o
    [Hint: try checking whether the first non-inlined, non-pure virtual function of class __RT_CLASS is defined]
    ild: (undefined symbol) __RT_CLASS::__vtbl -- referenced in the text segment of sun5/CrestTimMain.o
    [Hint: try checking whether the first non-inlined, non-pure virtual function of class __RT_CLASS is defined]
    could someone please guide us , how to get rid off this problem
    Thank you
    Vara

    As to the migration, two main points:
    - Use the "-compat" option on every CC command, compiling and linking which you already did.
    - Any "Anachronism" warnings produced by the 4.2 compiler are now errors. The Migration Guide has a complete list, along with explanations of how to fix the code.
    With those caveats, any code that worked with C++ 4.2 will work the same way with FD6U2 in compat mode.
    Rose

  • Linking Errors for STL

    Hi,
    I am working on a porting project. I am porting code compiled earlier under gcc2.95 to Sun Workshop 6. We are using stl libraries in our code. I had made chages in code like
    using std::sort;
    using std::istream;
    using std::ostream;
    using std::vector;
    using std::list;
    but it gives link time errors like
    ild: (undefined symbol) void std::__final_insertion_sort<int*>(__type_0,__type_0) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(bdd_FAExpression.o)
    ild: (undefined symbol) __type_1 std::copy<int*,int*>(__type_0,__type_0,__type_1) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(bdd_FAExpression.o)
    ild: (undefined symbol) void std::vector<FAExpression*,std::allocator<FAExpression*> >::__insert_aux(FAExpression**,FAExpression*const&) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(bdd_FAExpression.o)
    ild: (undefined symbol) void std::vector<FAExpression*,std::allocator<FAExpression*> >::__insert_aux(FAExpression**,FAExpression*const&) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(leq_convert.o)
    ild: (undefined symbol) void std::vector<FAMacroGroup*,std::allocator<FAMacroGroup*> >::__insert_aux(FAMacroGroup**,FAMacroGroup*const&) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(bdd_FAExpression.o)
    ild: (undefined symbol) void std::vector<FAMacro*,std::allocator<FAMacro*> >::__insert_aux(FAMacro**,FAMacro*const&) -- referenced in the text segment of ../../studio_SOLARIS64/lib/leq.a(bdd_FAExpression.o)
    Can anyone help me to sort out thse problems. I would like to say thanks in advance.
    Amandeep

    Hi Amandeep!
    I'm sorry that nobody answered you for 6 years. Maybe this answer will be useful for someone nowadays.
    I had the same problem some time ago and I got to fix it after hard work and thinking.
    This problem is specific for Sun WorkShop 6 update 2 C++ 5.3 2001/05/15.
    First of all, the best solution is updating to the last version of Sun Studio if possible, because
    the version mentioned above is an end-of-life one. If not possible, try the following.
    Typically, you declare a vector and later add elements to it:
    //Template is declared empty:
    std::vector<ClassObject> ObjectVector;
    // Later, when appendig an object is required, methods insert or push_back are used:
    ObjectVector.push_back (Object);
    // or
    ObjectVector.insert (Position, Object);
    But push_back and insert methods, among others, use __insert_aux method, that is not available.
    However, there's an other way to handle a vector that avoid the use of those buggy methods
    (buggy in this compiler version only):
    int n = theNeededSize;
    std::vector<ClassObject> ObjectVector (n);
    int TemplateSize = n;
    // Now objects in the template can be set properly.
    for (size_type Index = 0; Index < TemplateSize; Index++)
         ObjectVector[Index].SetDataMethod1 (...);
         ObjectVector[Index].SetDataMethodN (...);
         // or ...
         ClassObject objectOfClassObject;
         ObjectVector[Index] = objectOfClassObject;
    Using the constructor:
    EXPLICIT vector (sizetype n)
    : __start(0), __finish(0), __end_of_storage(0,Allocator())
    T value = T();
    __initn(n,value);
    solves the problem.
    In this thread there is more detailed information:
    http://forum.java.sun.com/thread.jspa?threadID=5071034
    Hope this is useful.
    Bye.

  • Undefined symbol referenced in -n command line argument

    I am migrating from CC 4.2 to CC 6.0 and cannot determine what is causing the following error during/after linking:
    ild: (undefined symbol) void __Cimpl::cplus_init() -- referenced in -u command line argumentAll of the .o files are produced without error and a binary is produced, but without execute permissions. I read the C++ Migration Guide and have checked to be sure that all of my compile commands include -library=iostream and -compat=4.
    What can I check next?

    There is no C++ 6.0. Run the command
    CC -V
    to find out your compiler version.
    The -library=iostream option is for use only in the default standard mode. To build a compatibility-mode program, use the option
    -compat=4
    on every CC command line, compiling and linking. Do not use -library=iostream.
    I reccomend the following sequence for migrating from C++ 4.2 to a recent Sun C++ compiler:
    1. Build the entire program using -compat=4. Using the Migration Guide as a reference, fix the code to eliminate all warnings.
    2. Remove the -compat=4 option, and add the option
    -library=iostream,no%Cstd
    to every CC command line, compiling and linking. Fix all errors and fix the code to eliminate all warnings.
    3. Check the Migration Guide for language definition changes, such as the behavior of new-expressions and the scope of variables defined in the header of a for-statement. You can use -features=xxx options to restore the old compiler behavior, but I recommend fixing the code instead.
    4. Try building without the -library=iostream,no%Cstd option. Your code will then use standard iostreams instead of "classic" iostreams. Simple uses of iostreams will work either way. Some uses of iostreams need to be modified to work with standard iostreams. If your code doesn't work as-is, schedule a time to convert to standard iostreams. Using classic iostreams can interfere with the use of the rest of the C++ standard library.

  • Help !! a link error

    when I link my application to an lib. the following link error occurs:
    Undefined first referenced
    symbol in file
    __RTTI__1CpknKDT_TSymbol4nJRWCString___ /am/lib/sun4.solaris2.9/libDV.so
    How can I get the information about the symbols in a lib?
    I'm not sure where the symbol __RTTI__1CpknKDT_TSymbol4nJRWCString is defined?

    I see that this forum software deleted the stuff in angle brackets in my original answer. The missing RTTI symbol refers to const DT_TSymbol< RWCString >* That is, a pointer to template class DT_TSymbol instantiated on type RWCString.
    The missing symbol is a data object generated by the compiler. Since the data object is referenced in each shared library, it should be contained in each shared library.
    The RTTI data is missing, and there are at least two reasons why that might be so.
    1. The library was not built correctly; a necessary object file was omitted. That missing object file would have contained the RTTI data.
    2. The library was built with a compiler that neglected to emit the RTTI object (a compiler bug).
    Determining which is the case is beyond the scope of what we can do in this forum.
    A place to start is to have whoever built those libraries add the option "-z defs" to the CC command line that was used to create each shared library. They will see linker error messages about all the needed symbols that are missing. That's a starting point for tracking down why they are missing.
    In general, shared libraries should be built with "-z defs" so that the creator of the library finds out about missing symbols instead of inflicting the pain on clients of the library.

  • Link error , help me!

    ild: (Performing full relink) symbol definitions conflict [...]
    ild: (undefined symbol) __type_1 std::remove_copy<std::list<CTestThread*,std::al
    locator<CTestThread*> >::iterator,std::list<CTestThread*,std::allocator<CTestThr
    ead*> >::iterator,CTestThread*>(__type_0,__type_0,__type_1,const __type_2&) -- r
    eferenced in the text segment of ./TestApp.o
    ild: (undefined symbol) std::list<CDatabase*,std::allocator<CDatabase*> >::itera
    tor std::list<CDatabase*,std::allocator<CDatabase*> >::erase(std::list<CDatabase
    *,std::allocator<CDatabase*> >::iterator,std::list<CDatabase*,std::allocator<CDa
    tabase*> >::iterator) -- referenced in the text segment of Database/DatabasePool
    .o
    ild: (undefined symbol) std::list<CTestThread*,std::allocator<CTestThread*> >::i
    terator std::list<CTestThread*,std::allocator<CTestThread*> >::erase(std::list<C
    TestThread*,std::allocator<CTestThread*> >::iterator,std::list<CTestThread*,std:
    :allocator<CTestThread*> >::iterator) -- referenced in the text segment of ./Tes
    tApp.o
    ild: (undefined symbol) std::list<CManage*,std::allocator<CManage*> >::iterator
    std::list<CManage*,std::allocator<CManage*> >::erase(std::list<CManage*,std::all
    ocator<CManage*> >::iterator,std::list<CManage*,std::allocator<CManage*> >::iter
    ator) -- referenced in the text segment of Manage/ManageSvr.o
    why ?

    I got this error, too, and here's a short version how I got it:
    #include <iostream>
    #include <string>
    using namespace std;
    std::string setting(std::string xx)
       xx.assign("Something assigned");
       return  xx;
    int main ()
      std::string yy;
      yy=setting(yy);
      cout << "FINALE: " << yy << endl;
      return 0;
    $ make
    CC -c -g -DSS_UNIX -I. -g  main.cpp
    CC -g -o main main.o   -lnsl -lm -lrt 
    ild: (Performing full relink) symbol definitions conflict [...]
    ++++++TARGET DONE++++++It started when I made the function setting to return std::string. However, the program works as it should.

  • Visa, BorladC++ Builder3.1, linking errors

    I have linking error, then building my program written in BorlandC++ Builder3.1
    (program has no compiling errors)
    I need to use header in my program.
    It was installed in C:\VXIpnp\Win95\include directory.
    I have 2 linking errors:
    Undefined symbol _viClose in module
    Undefined symbol _viOpen in module
    I copied all VISA (driver from National Insruments (www.ni.com), i use it to communicate with serial port RS232)
    so I copied all VISA files from C:\VXIpnp\Win95 to C:\BorlandC dirctory ("include" ant "lib" folders respectively)
    errors persist.
    In BorlandC++ Options>>Directories i wrote paths to library and to include in C:\VXIpnp\Win95.
    errors persist.
    I also tried with following
    3 programs:
    1) BorlandC++ Builder 6 (evaluation version)
    2) Icc – win32 (free) and
    3) SoftIntegration Ch 4.5 standart (free)
    They all throwed the same error messages:
    Undefined symbol _viClose in module
    Undefined symbol _viOpen in module
    ViClose and viOpen are defined in hereby:
    72) ViStatus _VI_FUNC viOpenDefaultRM (ViPsession vi);
    83) ViStatus _VI_FUNC ViClose (ViObject vi);
    I opened visatype.h to fined out how ViStatus....are defined and made table:
    Are _VI_FUNC and VIPSession defined correctly?
    (Because there is no such variable as ViPtr and VISAFN in BorlandC.)
    If they are not how must i define them?
    I attached visa.h and visatype.h and table for convenience.
    Thanks in advise
    Gintare
    Attachments:
    table.doc ‏34 KB
    visatype.h ‏6 KB
    visa.h ‏34 KB

    Are you linking against C:\VXIpnp\Win95\lib\bc\visa32.lib? If not, do so and that should solve your problems.
    If you are trying to link with that library, and it's not working, perhaps you'll need to create your own import library based on visa32.dll. We haven't changed the Borland import library in awhile, and I don't know if it's still compatible with the latest versions of the Borland products.
    Dan Mondrik
    National Instruments

  • C++ linking error Undefined symbols  AIX 5.3 xlC  bdb 4.7

    I am getting the following linking error while linking the MyCb example given in Berkley DB guide
    xlC -bnoquiet -o /ra2/frt_bld/TMPBIN/BDBtest \
    /ra2/frt_bld/TMPOBJ/DBAbs.o \
    /ra2/frt_bld/TMPOBJ/MyDb.o \
    /ra2/frt_bld/TMPOBJ/PPNum.o \
    /ra2/frt_bld/TMPOBJ/PPNumStore.o \
    /ra2/frt_bld/TMPOBJ/PPNumStoreDB.o \
    /ra2/frt_bld/TMPOBJ/UTDbtest.o \
    /ra2/frt_bld/TMPOBJ/UTPPNUm.o \
    -lC_r ../../../ACE_wrappers/ace/libACE.so -ldb_cxx -L../../../db-4.7.25/build_unix -L/usr/local/ssl -L/../../../ACE_wrappers/ace -lcrypto -lpthread -lz -lm -o /ra2/frt_bld/TMPBIN/BDBtest
    ld: 0711-318 ERROR: Undefined symbols were found.
    The following symbols are in error:
    Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
    RLD: Address Section Rld-type Referencing Symbol
    .Db::set_error_stream(std::basic_ostream<char,std::char_traits<char> >*) [1010] ER PR MyDb.cpp(/ra2/frt_bld/TMPOBJ/MyDb.o)
    00003b50 .text R_RBR [148] .MyDb::MyDb(std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)
    .Db::open(DbTxn*,const char*,const char*,DBTYPE,unsigned int,int) [1012] ER PR MyDb.cpp(/ra2/frt_bld/TMPOBJ/MyDb.o)
    00003b84 .text R_RBR [148] .MyDb::MyDb(std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)
    ER: The return code is 8.
    ld: 0711-317 ERROR: Undefined symbol: .Db::open(DbTxn*,const char*,const char*,DBTYPE,unsigned int,int)
    // File: MyDb.cpp
    #include "MyDb.h"
    #include <string>
    #include <iostream>
    // Class constructor. Requires a path to the location
    // where the database is located, and a database name
    MyDb::MyDb(std::string &path, std::string &dbName)
    : db_(NULL, 0), // Instantiate Db object
    dbFileName_(path + dbName), // Database file name
    cFlags_(DB_CREATE) // If the database doesn't yet exist,
    // allow it to be created.
    try
    // Redirect debugging information to std::cerr
    db_.set_error_stream( static_cast<std::ostream *>(&std::cerr) );
    // Open the database
    db_.open(NULL, dbFileName_.c_str(), NULL, DB_BTREE, cFlags_, 0);
    // DbException is not a subclass of std::exception, so we
    // need to catch them both.
    catch(DbException &e)
    std::cerr << "Error opening database: " << dbFileName_ << "\n";
    std::cerr << e.what() << std::endl;
    catch(std::exception &e)
    std::cerr << "Error opening database: " << dbFileName_ << "\n";
    std::cerr << e.what() << std::endl;
    //And then we need the implementation for the close() method:
    // Private member used to close a database. Called from the class
    // destructor.
    void
    MyDb::close()
    // Close the db
    try
    db_.close(0);
    std::cout << "Database " << dbFileName_
    << " is closed." << std::endl;
    catch(DbException &e)
    std::cerr << "Error closing database: " << dbFileName_ << "\n";
    std::cerr << e.what() << std::endl;
    catch(std::exception &e)
    std::cerr << "Error closing database: " << dbFileName_ << "\n";
    std::cerr << e.what() << std::endl;
    Thanks
    Anand Rathi
    Edited by: user10127683 on Jun 10, 2009 9:02 AM

    Hi Anand,
    http://www.oracle.com/technology/documentation/berkeley-db/db/ref/build_unix/aix.html <-- check FAQ #4.
    Please use a "-D_LARGE_FILES=1" when building BDB on AIX.
    Let me know how it works.
    Thanks,
    Bogdan Coman

  • Linking Error : Undefined Symbols: SUN Studio 5

    Hi ,
    I am facing some Linking error which throws up Undefined Symbol errors like .
    [Undefined                       first referenced
    symbol                             in file
    __rwstd::__rb_tree<DevNexus,DevNexus,__rwstd::__ident<DevNexus,DevNexus>,std::less<DevNexus>,std::allocator<DevNexus> >::iterator __rwstd::__rb_tree<DevNexus,DevNexus,__rwstd::__ident<DevNexus,DevNexus>,std::less<DevNexus>,std::allocator<DevNexus> >::erase(__rwstd::__rb_tree<DevNexus,DevNexus,__rwstd::__ident<DevNexus,DevNexus>,std::less<DevNexus>,std::allocator<DevNexus> >::iterator,__rwstd::__rb_tree<DevNexus,DevNexus,__rwstd::__ident<DevNexus,DevNexus>,std::less<DevNexus>,std::allocator<DevNexus> >::iterator) PacketServer.o
    __type_0 std::find<std::deque<AdapterPort,std::allocator<AdapterPort> >::iterator,AdapterPort>(__type_0,__type_0,const __type_1&) PacketServer.o
    void std::vector<Controller,std::allocator<Controller> >::__insert_aux(Controller*,const Controller&) Subsystem.o
    void std::deque<AdapterDisc,std::allocator<AdapterDisc> >::__allocate_at_end() PacketServer.o
    __rwstd::__rb_tree<unsigned long,std::pair<const unsigned long,char*>,__rwstd::__select1st<std::pair<const unsigned long,char*>,unsigned long>,std::less<unsigned long>,std::allocator<std::pair<const unsigned long,char*> > >::iterator __rwstd::__rb_tree<unsigned long,std::pair<const unsigned long,char*>,__rwstd::__select1st<std::pair<const unsigned long,char*>,unsigned long>,std::less<unsigned long>,std::allocator<std::pair<const unsigned long,char*> > >::erase(__rwstd::__rb_tree<unsigned long,std::pair<const unsigned long,char*>,__rwstd::__select1st<std::pair<const unsigned long,char*>,unsigned long>,std::less<unsigned long>,std::allocator<std::pair<const unsigned long,char*> > >::iterator,__rwstd::__rb_tree<unsigned long,std::pair<const unsigned long,char*>,__rwstd::__select1st<std::pair<const unsigned long,char*>,unsigned long>,std::less<unsigned long>,std::allocator<std::pair<const unsigned long,char*> > >::iterator) DeviceProp.o
    std::deque<AdapterPort,std::allocator<AdapterPort> >::~deque() PacketServer.o
    __type_0 std::find<std::deque<AdapterDisc,std::allocator<AdapterDisc> >::iterator,char*>(__type_0,__type_0,const __type_1&) PacketServer.o
    unsigned std::deque<AdapterPort,std::allocator<AdapterPort> >::__buffer_size() PacketServer.o
    unsigned std::deque<AdapterDisc,std::allocator<AdapterDisc> >::__buffer_size() PacketServer.o
    void __rwstd::__rb_tree<DevNexus,DevNexus,__rwstd::__ident<DevNexus,DevNexus>,std::less<DevNexus>,std::allocator<DevNexus> >::__deallocate_buffers() PacketServer.o
    std::deque<AdapterDisc,std::allocator<AdapterDisc> >::~deque() PacketServer.o
    ld: fatal: Symbol referencing errors. No output written to spagent
    *** Error code 1
    make: Fatal error: Command failed for target `spagent'
    Current working directory /home/kiranc/solaris_hang1/4.0/agent
    *** Error code 1
    make: Fatal error: Command failed for target `recurse'
    Current working directory /home/kiranc/solaris_hang1/4.0/agent
    *** Error code 1
    make: Fatal error: Command failed for target `all'
    I am using Sun Studio 5. Pls let me know how to resolve/fix this. Unfortunately I cant upgrade the Sun Studio.
    Thanks in Advance
    Kiran                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Kiran ,
    if you cannot upgrade Sun Studio, I suggest that you take a view on this solution:
    http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5069680
    It only works to std::vector::__insert_aux method, but I think you could get some useful idea from it.
    Good luck.
    Bye.

Maybe you are looking for

  • Front Row on an External Display

    **Note that this is for Leopard's Front Row and only may not apply to Tiger's** Here's an explanation of the bugs/irksomes now facing Front Row 1. The screensaver option can be buggy so go to preferences within Front Row to disable it. 2. Whatever sc

  • My Safari Windows will not close

    My safari windows will not close. I can use the internet fine, but safari will not allow me to close or minimize the window. This is also stopping me from shutting down my computer without removing the battery. Should I take it in to get repaired, or

  • Hi everyone:-) I am desperate for help please

    I have deleted some of my source files that were saved on my hard drive. The images are all still visible in lighroom, obviously previews. Is there anyway I can still use these images with the source files gone? I ran a system recovery and the files

  • Switched internal hard drives from G4 to Mac Pro - not being recognized

    I just transfered to internal hard drives from my G4 MDD OS Tiger and my Mac Pro isn't recognizing them in the bays. Jumpers were removed for slave option. Are the older drives not compatible with the newer computer? What am I missing?

  • Elements 8 install problem, error 1402

    Hi First time user here. I just purchased Elements 8 and during the install I get an error 1402. HKEY_LOCAL_Machine\Software\Classes\.jp2\OpenWidthList. Does any one have instructions on solving this or able to point me in the right direction. I'm re