Cannot compile code with debug symbols

I have a source code file that will not compile with debug symbols. I get an assertion failed in file ../src/regman/regman_local.cc at line 5224. The compile command and output are below.
/opt/SUNWspro/bin/cc -g -xarch=v9b -xopenmp=noopt -xc99=all -c -o output/spirecon.o spirecon.c
cg: assertion failed in file ../src/regman/regman_local.cc at line 5224
cg: Out of range
cg: 1 errors
cc: cg failed for spirecon.c
However without the debug options and using the default -fast switch, i.e.
/opt/SUNWspro/bin/cc -fast -xarch=v9b -xopenmp=noopt -xc99=all -c -o output/spirecon.o spirecon.c
it compiles without any problems.
I was hoping someone might have a suggestion as to how what might cause this type of error.

I have been told this is bugid: 4420630
It only happens when you try to use the optimizing
backend code generator without any optimization.
(That's what -xopenmp=noopt does)
If you add an -xO1 flag the assertion should go away, but you
will also lose some (but not all) of your debuggability.
--chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • [Solved] Recompile Software with debugging symbols?

    Has anyone an idea how to compile darktable with debugging symbols? I've grabbed the sources from the arch package and added the strings
    export CFLAGS="$CFLAGS -O0 -fbuiltin -g"
    export CXXFLAGS="$CXXFLAGS -O0 -fbuiltin -g"
    to the PKGBUILD as the arch wiki described in the "Step by step debugging guide", but it don't seems to work proberly. I can't obtain a proper backtrace.
    "gdb darktable" only gives me the message:
    Reading symbols from /usr/bin/darktable...(no debugging symbols found)
    What's my fault?
    Last edited by Thorsten Reinbold (2013-12-29 14:40:22)

    Sorry, that was really stupid. Thanks for the hints, I was able to compile now. But the next problem is knocking on the door: when I try to get a backtrace, I get a "No stack."-message from gdb. Google wasn't helpful with this and those are my first steps in debugging. Maybe some has an Idea? I only need a full backtrace for an upstream bugreport.
    Edit: got it. There was a gdb Zombie in the background.
    Solved!
    Last edited by Thorsten Reinbold (2013-12-29 14:40:04)

  • [solved]How to compile a software with debug symbol from aur?

    How does auch developers compile their project? Seems that archlinux user always trying to avoid build software from git/svn directly. But after searching a lot  I sill haven't found how to compile with debug symbol while using PKGBUILD.
    Anyone help?
    Last edited by ranjiao (2009-08-27 14:28:09)

    ranjiao wrote:PKGBUILD calls autogen.sh before calling make, and gnome-autogen.sh is called in autogen.sh
    I have tried to add --enable-debug while calling autogen.sh and gnome-autogen.sh, but it doesn't work.
    Isn't PKGBUILD just a script? It calls what you make it calls by adding commands...

  • Trying, failing to build qt5 with debugging symbols

    As per this article, I modified my PKGBUILD like so (-developer-build):
    build() {
    cd ${_pkgfqn}
    export QTDIR="${srcdir}"/${_pkgfqn}
    export LD_LIBRARY_PATH="${QTDIR}"/qtbase/lib:"${QTDIR}"/qttools/lib:"${LD_LIBRARY_PATH}"
    export QT_PLUGIN_PATH="${QTDIR}"/qtbase/plugins
    export PATH="${srcdir}/python2-path:$PATH"
    [[ "${CARCH}" = "i686" ]] && SSE2="-no-sse2"
    PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource -developer-build \
    Don't know if I put the option in the wrong place, though, or if that information is outdated for qt5 - but it's not building for me. Here's where makepkg stops:
    ln -s libQt5Widgets.so.5.4.0 libQt5Widgets.so
    ln -s libQt5Widgets.so.5.4.0 libQt5Widgets.so.5
    ln -s libQt5Widgets.so.5.4.0 libQt5Widgets.so.5.4
    rm -f ../../lib/libQt5Widgets.so.5.4.0
    mv -f libQt5Widgets.so.5.4.0 ../../lib/
    rm -f ../../lib/libQt5Widgets.so
    rm -f ../../lib/libQt5Widgets.so.5
    rm -f ../../lib/libQt5Widgets.so.5.4
    mv -f libQt5Widgets.so ../../lib/
    mv -f libQt5Widgets.so.5 ../../lib/
    mv -f libQt5Widgets.so.5.4 ../../lib/
    make[3]: Leaving directory '/home/chris/Software/qt5/src/qt-everywhere-opensource-src-5.4.0/qtbase/src/widgets'
    make[2]: Leaving directory '/home/chris/Software/qt5/src/qt-everywhere-opensource-src-5.4.0/qtbase/src'
    Makefile:45: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/chris/Software/qt5/src/qt-everywhere-opensource-src-5.4.0/qtbase'
    Makefile:70: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    Not sure what happened. How do I get more information?
    I need qt5-base with debugging symbols so I can get helpful traces for plasma-desktop crashes. So I should also ask: is it possible to modify the PKGBUILD to just compile qt5-base (and perhaps qt5-webkit and qt5-webengine)? qt5 is huge...
    EDIT: and yes I had qtwebkit uninstalled at the time
    Last edited by YAOMTC (2015-01-03 06:12:49)

    I hate it when the only result for a problem is an unanswered question...
    Anyway, invoking make manually uncovers what is the problem - there's a bunch of errors similar to this:
    ../gui/text/qfontengine_ft.cpp:1146:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
    for (int x = 0; x < slot->bitmap.width; x++) {
    ^
    cc1plus: all warnings being treated as errors
    So the -Werror is the culprit. Looking at the ./configure -help output it turns out that the -developer-build enables -Werror. But there's -no-warnings-are-errors. So yeah, passing -no-warnings-are-errors in addition to -developer-build should fix the compilation.
    I have updated the wiki accordingly.
    EDIT: the compilation gets a bit further, but it now fails because of tests.
    EDIT2: it pays off to read configure rather than rely on some random suggestion from the wiki. There's a "-debug" option, which should just enable debugging. It hasn't finished compiling here yet, but it got a lot further than before.
    Last edited by 6xx (2015-02-03 21:13:49)

  • Conditional compile code for debug v.s. release

    Hi,
    Is there a pre-defined symbol (e.g., DEBUG, DEBUG) for conditional compile section of code for debug v.s. release?
    Thanks for your reply in advance!

    Take a look at TargetConditionals.h, I use TARGETIPHONESIMULATOR a lot.

  • How to display G/L Account code with separation symbol

    Hi, there
    I got a problem that I want to show formated account code in one column in grid, which formated with separation symbol, and i'd like to binding this column to one user defined field in UDT, user can input Acount code in this column. who knows if there is a simple way to show the formated Account code. I am using SBO 2004 and VB .Net.
    I did not find any function about it in SBO 2004 SDK, the "FormatCode" property in ChartOfAcctounts object only show Account code with out separator, so am I need find out the segment and separator information and format using code?
    Thanks for any help.
    Kathy

    Hi Kathy
    Not sure what you asking.
    The one part you asking "how can I show the link button in the Account code column". The answer to this is if you are using the xml form made by the screen painter you must open the xml file outside of screen painter and make that column of type 116 instead of 16. Obviously you still need to do the usual like bind the column and set LinkedObject = APbouiCOM.BoLinkedObject.lf_GLAccounts
    Then to the second part of your question
    A linked button for a gl account with dashes which are "-" should pull the chart of accounts window open. The format code with the dashes is CORRECT! You must make sure there is no unwanted spaces or any funny characters. Also i did the linked button in Screen Painter. Make your arrow, link it to a edit box.Then set linkedObject value to 1.
    Just for testing purposes make a edit text with the linked button linked to it. Type a gl account manualy in the box with dashes and then press the orange arrow. You'll see that it works with the dashes.
    Hope this helps

  • Is it possible compiling code with java2 sdk 1.4.2_16 using netbeans 6.5.1?

    Hi,
    I'm using NetBeans 6.5.1 ide (uses jdk 1.6).
    I prepared java codes to deploy the system uses java version 1.4.2_16.
    Is it possible to compile code for 1.4.2_16 using NetBeans 6.5.1?
    Thanks.

    If you really have iphone 3gs, then you can update it further.
    If you have an iphone 3g, then you cannot.
    Identifying iPhone models - Apple Support

  • Help!! cannot compile codes...

    i've found several codes in the internet which is works (said the author)
    when i try to compile the codes (.java) there's a lot of errors occur. example of the error is:
    ContributorMgr.java:73:cannot resolve symbol
    symbol: class ChatItem
    location: class ContributorMgr
    ChatItem ci = new ChatItem();
    ^
    but i can compile ChatItem class.
    why this problem happens?
    how to overcome it?
    anyone can help me?
    thanks in advance

    Read the docs.
    You call it like this:
    javac -d targetDirectory MyClass.java
    If MyClass.java is defined within a package "dog.cat", then javac will create appropriate subdirectories under the targetDirectory directory, and put the class file there. So the result of the above would create:
    targetDirectory/dog/cat/MyClass.class
    What you did was to tell javac to put compiled classes under a directory named "ContributorMgr.java", but then not to tell it to compile anything.
    This is all covered in the docs!
    You should really define a package for any non-trivial code.
    Also your classpath should include the root directory of your package directory hierarchy.

  • Cannot compile class with a package

    Hello,
    I am trying to implement the package example from the SUN Tutorial. It can be found on the page: http://java.sun.com/docs/books/tutorial/java/interpack/QandE/packages-questions.html
    I think I am doing like described but it doesn�t work. The files are stored like following on my machine:
    D:\Test\Java\mygame\Shared\Utilities.java               (this file can be compiled)
    D:\Test\Java\mygame\Server\Server.java                    (can�t be compiled)
    D:\Test\Java\mygame\Client\Client.java                    (can�t be compiled)
    I have no CLASSPATH set (but I tried), Java is installed in C:\Java\j2sdk, I also tried D:\mygame\Shared\Utilities|Server|Client.java
    The error message is:
    cannot resolve symbol
    Are there any further prerequisites?
    Thank you

    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file: package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    And a statement to run the program is:
    java myapp.aProgram
    (This can be issued from any directory, as Java will search for the program, starting the search from the classpath directories.)
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)
    Here is a reference: http://java.sun.com/j2se/1.4.1/docs/tooldocs/findingclasses.html

  • Problems Compiling Code With Function Pointers Using Sun CC (SUNWspro)

    I have a header file that contains a declaration to a function pointer as follows:
    int (*pFuncPntr)(char host, char comm, void *data);
    Then, in a *.c file which includes the header file where the function pointer is declared, the prototype for the function is at the top of the file and appears as follows:
    int someFunc(char hostname, char community, void *data);
    Then, in the same *.c file, down below, I attempt to assign the function pointer to the address of the function declared as follows:
    pFuncPntr = &someFunc;
    ... and further down in the *.c file is the definition of someFunc. ........................
    When I compile, I get the following error:
    : identifier redeclared: pFuncPntr
    current : int
    previous: pointer to function(pointer to char, pointer to char, pointer
    to void) returning int : "/vobs/pp2dev/src/cmds/emcp_pmgmtd/sparc_solaris/../emc
    p_pmgmtd.h", line 84
    "/vobs/pp2dev/src/cmds/emcp_pmgmtd/sparc_solaris/emcp_pmgmtd_solaris.c", line 46
    As far as I've read, this is the standard way of assigning a function pointer to the address of a function.
    Does anyone have any ideas what CC compiler is complaining about?
    Appreciate your response,
    dedham_ma_man

    WHen I try to include the ftp.jar package?? I use "package com.enterprisedt.net.ftp;".That isn't how you import a package. That declares that the class it is at the top of will belong to that package, and that's not what you want. I'm guessing that you need
    import com.enterprisedt.net.ftp.*;
    at the top of your code, just after the line where you declare the real name of the package your class is going to belong to.
    By the way, you need the compiled version of your downloaded FTP code, i.e. the .class files. If you got source code (.java files) you'll need to compile them, but you should be able to get the compiled version as a download.

  • Compiling code with OracleRuntime reference

    Hi,
    Currently we are building our code on Windows machines and deploying to oracle that is running on a unix machine.
    Is there a jar I can add to the classpath to have my code compile on my local machine (windows) when it has references to the OracleRuntime?
    Regards,
    Gustav

    Hello Avi,
    I would like to make calls to the OracleRuntime class such as:
    OracleRuntime.getSessionSize();
    OracleRuntime.getNewspaceSize();
    But I would like to compile the code on my windows machine and then deploy it to a unix machine and use loadjava to load the classes into the database. So I am looking for sort of a OracleRuntime dummy class that I can use to compile the code.
    I checked the jdbc driver, but it does not seem to contain any OracleRuntime class.
    /Gustav

  • Error when run the compiled code

    I have code below,
    import java.sql.*;
    public class testmysql{
         public static void main(String args[]){
              Connection conn = null;
    try{
    String userName = "root";
    String password = "password";
    String url = "jdbc:mysql://localhost:3307/ectol_db";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    }catch (Exception e) {
              e.printStackTrace();
    System.err.println ("Cannot connect to database server");
    }finally{
    if (conn != null){
    try{
    conn.close ();
    System.out.println ("Database connection terminated");
    }catch (Exception e) {
         e.printStackTrace();
         /* ignore close errors */
    and i have the mysql-connector-5.0.6.jar
    I able to compile code with javac testmysql.java command
    However, when i try to run the code with java testmysql command, it prompt me error below
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at testmysql.main(testmysql.java:11)
    Cannot connect to database server
    Anyone can help?

    ccwoon80 wrote:
    Actually, the jar and class file was in the same path...
    Thus, what the correct command i need to run the my code?Then your classpath would be .;mysql.jar (or whatever the heck the name of the connector was).
    So java -cp .;mysql.jar foo.bar.MyClass

  • Support for debugging symbols

    Hi,
    I'm using Kde but kwin crashes very often. I have submitted the bug to bugs.kde (http://bugs.kde.org/show_bug.cgi?id=150130) but I cannot manage to install debug symbols.
    I have read the wiki (http://wiki.archlinux.org/index.php/Deb … ing_Traces), and after recompiling glibc all is the same.
    This is the trace:
    (no debugging symbols found)
    Using host libthread_db library "/lib/libthread_db.so.1".
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread -1231751456 (LWP 2910)]
    [KCrash handler]
    #6  0xb774d637 in NETWinInfo::windowType () from /opt/kde/lib/libkdecore.so.4
    #7  0xb670e186 in KWinInternal::Client::windowType ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #8  0xb670ea91 in KWinInternal::Client::isDesktop ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #9  0xb670f2b2 in KWinInternal::Client::isSpecialWindow ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #10 0xb67577fd in KWinInternal::findClientInList<KWinInternal::FetchNameInternalPredicate> () from /opt/kde/lib/libkdeinit_kwin.so
    #11 0xb6732ace in KWinInternal::Client::setCaption ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #12 0xb674c7b0 in KWinInternal::Client::manage ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #13 0xb674e676 in KWinInternal::Workspace::createClient ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #14 0xb6751ccd in KWinInternal::Workspace::workspaceEvent ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #15 0xb6751dce in KWinInternal::Application::x11EventFilter ()
        from /opt/kde/lib/libkdeinit_kwin.so
    #16 0xb70b0575 in ?? () from /opt/qt/lib/libqt-mt.so.3
    #17 0xbffba0b0 in ?? ()
    #18 0xbffb9f88 in ?? ()
    #19 0x00100000 in ?? ()
    #20 0xb75c7dd0 in ?? () from /opt/qt/lib/libqt-mt.so.3
    #21 0xb75c7dd0 in ?? () from /opt/qt/lib/libqt-mt.so.3
    #22 0x0000000c in ?? ()
    #23 0xbffb9e98 in ?? ()
    #24 0xb70bf548 in QApplication::x11ProcessEvent ()
        from /opt/qt/lib/libqt-mt.so.3
    Backtrace stopped: frame did not save the PC
    Any suggestions?
    Thanks.

    This error is still occurring for the latest HP-UX JDK 1.5.0_05. I created a simple servlet that performed the following functions:
    1) Write output to PrintWriter from HttpServletResponse
    2) Overrirde the init() method for the servlet
    3) Set a System Property
    4) Open a client socket to a DMI Listener Port
    It appears that items 1-3 completed properly, but the server crashed when opening a client socket from within a servlet container. This is now a highly visible issue that is preventing some of my company's customers from utilizing SunOne as a web server platform for our web interface. I am going to open a support issue with Sun support and see where things go from there. If anyone has any updated information, please post soon. Thanks,
    Morgan Monger
    Senior Software Developer
    Datatel, Inc.

  • Studio 12: C compiler generates bad code with -m64 -KPIC -xO2

    Hello,
    after upgrading my Solaris 10/x64 machine from Studio 11 to Studio 12 some problems were fixed, but others came up; like this one:
    I have a code snippet that obviously causes the C compiler to generate wrong code if compiled with options -m64 -KPIC -xO2. If any of these options are missing, it runs fine. Here's the example code:
    #include <stdio.h>
    #include <strings.h>
    static int do_something() { return 0; }
    static int foo() {
        fprintf(stderr, "\n!! BUG: BAD CODE! unexpected function call foo()!\n\n");
        return 222;
    static int bar() {
        fprintf(stdout, "\nOK: bar() called\n\n");
        return 0;
    static const struct {
        const char* name;
        int (*func)();
        int flag;
    } tab[] = {
        { "foo",  &foo,  0 },
        { "bar",  &bar,  0 },
        { 0, 0, 0 }
    int main(int argc, const char** argv) {
        int i;
        for (i=0; tab.name; i++) {
    if( strcmp(tab[i].name, "bar") == 0 ) {
    if(tab[i].flag) {   /* not reached */
    if(!do_something()) {
    return 2;
    return (*tab[i].func)();
    return 1; /* not reached */
    Many lines seem to be bogus, but they are actually needed to reproduce the problem.
    This is what happens:# cc -m64 -KPIC -xO2 bug.c && ./a.out ; echo $?
    !! BUG: BAD CODE! unexpected function call foo()!
    222
    If I compile with debugging information (-g), I get expected behavior, which is:# cc -m64 -KPIC -g bug.c && ./a.out ; echo $?
    OK: bar() called
    0
    While creating the test case I've also seen SIGSEGV at runtime in the bug case - which is probably due to a wrong calculated function address for jmp (just guessing).
    Does anyone know if this is a known bug?
    Any help is appreciated.
    The rest of this posting is information about my system and Studio 12 patch level:# uname -a
    SunOS v20 5.10 Generic_137112-08 i86pc i386 i86pc
    # /usr/SUNWspro/bin/version
    Machine hardware: i86pc
    OS version: 5.10
    Processor type: i386
    Hardware: i86pc
    The following components are installed on your system:
    Sun Studio 12
    Sun Studio 12 C Compiler
    Sun Studio 12 C++ Compiler
    Sun Studio 12 Tools.h++ 7.1
    Sun Studio 12 C++ Standard 64-bit Class Library
    Sun Studio 12 Garbage Collector
    Sun Studio 12 Fortran 95
    Sun Studio 12 Debugging Tools (including dbx)
    Sun Studio 12 IDE
    Sun Studio 12 Debugger GUI
    Sun Studio 12 Performance Analyzer (including collect, ...)
    Sun Studio 12 X-Designer
    Sun Studio 12 VIM editor
    Sun Studio 12 XEmacs editor
    Sun Studio 12 Performance Library
    Sun Studio 12 LockLint
    Sun Studio 12 Building Software (including dmake)
    Sun Studio 12 Documentation Set
    Sun Studio 12 /usr symbolic links and GNOME menu item
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.9 SunOS_i386 Patch 124868-07 2008/10/07
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.9 SunOS_i386 Patch 124864-08 2008/10/16
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.3 SunOS_i386 Patch 127002-04 2008/04/16
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.6 SunOS_i386 Patch 124873-06 2008/08/20
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.6 SunOS_i386 Patch 126996-04 2008/09/03
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.8 SunOS_i386 Patch 126504-01 2007/07/19

    I'm watching Bug ID: [6774287|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6774287] for quite a while and it seems to be fixed some time ago (State: 8-Fix Available, bug). Does anybody know if the fix made it in some officially available SunStudio 12 C compiler (backend) patch already? I'm using this SS12 patch-level meanwhile:
    # /usr/SUNWspro/bin/version
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.9 SunOS_i386 Patch 124868-08 2008/11/25
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.9 SunOS_i386 Patch 124864-09 2008/12/16
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.3 SunOS_i386 Patch 127002-05 2008/10/21
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.6 SunOS_i386 Patch 124873-06 2008/08/20
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.6 SunOS_i386 Patch 126996-04 2008/09/03
    version of "/usr/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.8 SunOS_i386 Patch 126504-01 2007/07/19

  • Problem to compile sample code with C++ Parser on Unix

    I just downloaded C++ parser and tried to compile the sample source code, but I got
    the following error:
    g++ -o DOMSample -I../include DOMSample.cpp -L../lib/xml8 -L../lib/core8 -L../lib/nls8 -L../lib/xmlc8 -L../lib/nsl -L../lib/socket
    Undefined first referenced
    symbol in file
    Node::getFirstChild(void) /var/tmp/ccarlA8y.o
    Node::getValue(void) /var/tmp/ccarlA8y.o
    XMLParser::xmlterm(void) /var/tmp/ccarlA8y.o
    XMLParser::getDocumentElement(void) /var/tmp/ccarlA8y.o
    xmlinit__9XMLParserPUcPFPvPCUcUi_vPvP8xmlsaxcbT3T1 /var/tmp/ccarlA8y.o
    Node::hasChildNodes(void) /var/tmp/ccarlA8y.o
    Node::getChildNode(unsigned int) /var/tmp/ccarlA8y.o
    Node::getName(void) /var/tmp/ccarlA8y.o
    Node::numChildNodes(void) /var/tmp/ccarlA8y.o
    XMLParser::xmlparse(unsigned char *, unsigned char *, unsigned int)/var/tmp/ccarlA8y.o
    Node::getType(void) /var/tmp/ccarlA8y.o
    ld: fatal: Symbol referencing errors. No output written to DOMSample
    collect2: ld returned 1 exit status
    make: *** [DOMSample] Error 1
    Please help me out. Thanks,
    null

    I have the similar problem when I tried to compile sample code with C++ parser on WinNT4. I am using Micrsoft Visual Studio V6.0. I added the include file and lib file in the path.
    Here are the error messages:
    Linking...
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall XMLParser::xmlterm(void)" (?xmlterm@XMLParser@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall DocumentType::getEntities(void)" (?getEntities@DocumentType@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NamedNodeMap::item(unsigned int)" (?item@NamedNodeMap@@QAEPAVNode@@I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall NamedNodeMap::getLength(void)" (?getLength@NamedNodeMap@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall DocumentType::getNotations(void)" (?getNotations@DocumentType@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class DocumentType * __thiscall XMLParser::getDocType(void)" (?getDocType@XMLParser@@QAEPAVDocumentType@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall XMLParser::xmlparse(unsigned char *,unsigned char *,unsigned int)" (?xmlparse@XMLParser@@QAEIPAE0I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall XMLParser::xmlclean(void)" (?xmlclean@XMLParser@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::replaceData(unsigned long,unsigned long,unsigned char *)" (?replaceData@CharacterData@@QAEXKKPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::deleteData(unsigned long,unsigned long)" (?deleteData@CharacterData@@QAEXKK@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::insertData(unsigned long,unsigned char *)" (?insertData@CharacterData@@QAEXKPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::appendData(unsigned char *)" (?appendData@CharacterData@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall CharacterData::substringData(unsigned long,unsigned long)" (?substringData@CharacterData@@QAEPAEKK@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall CharacterData::getLength(void)" (?getLength@CharacterData@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall CharacterData::setData(unsigned char *)" (?setData@CharacterData@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall CharacterData::getData(void)" (?getData@CharacterData@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Text::splitText(unsigned long)" (?splitText@Text@@QAEPAVNode@@K@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::cloneNode(int)" (?cloneNode@Node@@QAEPAV1@H@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NamedNodeMap::removeNamedItem(unsigned char *)" (?removeNamedItem@NamedNodeMap@@QAEPAVNode@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall NamedNodeMap::setNamedItem(class Node *,class Node * *)" (?setNamedItem@NamedNodeMap@@QAEHPAVNode@@PAPAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NamedNodeMap * __thiscall Node::getAttributes(void)" (?getAttributes@Node@@QAEPAVNamedNodeMap@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::removeAttributeNode(class Attr *)" (?removeAttributeNode@Element@@QAEPAVAttr@@PAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::setAttribute(unsigned char *,unsigned char *)" (?setAttribute@Element@@QAEPAVAttr@@PAE0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Element::removeAttribute(unsigned char *)" (?removeAttribute@Element@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Element::getAttributeNode(unsigned char *)" (?getAttributeNode@Element@@QAEPAVAttr@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Attr::setValue(unsigned char *)" (?setValue@Attr@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Element::setAttributeNode(class Attr *,class Attr * *)" (?setAttributeNode@Element@@QAEHPAVAttr@@PAPAV2@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Attr * __thiscall Document::createAttribute(unsigned char *,unsigned char *)" (?createAttribute@Document@@QAEPAVAttr@@PAE0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class DocumentFragment * __thiscall Document::createDocumentFragment(void)" (?createDocumentFragment@Document@@QAEPAVDocumentFragment@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Element::normalize(void)" (?normalize@Element@@QAEXXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::removeChild(void)" (?removeChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::replaceChild(class Node *)" (?replaceChild@Node@@QAEPAV1@PAV1@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall Node::getOwnerDocument(void)" (?getOwnerDocument@Node@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getParentNode(void)" (?getParentNode@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall NodeList::item(unsigned int)" (?item@NodeList@@QAEPAVNode@@I@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall NodeList::getLength(void)" (?getLength@NodeList@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NodeList * __thiscall Document::getElementsByTagName(class Element *,unsigned char *)" (?getElementsByTagName@Document@@QAEPAVNodeList@@PAVElement@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: void __thiscall Node::setValue(unsigned char *)" (?setValue@Node@@QAEXPAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getPreviousSibling(void)" (?getPreviousSibling@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getLastChild(void)" (?getLastChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getNextSibling(void)" (?getNextSibling@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::getFirstChild(void)" (?getFirstChild@Node@@QAEPAV1@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::insertBefore(class Node *,class Node *)" (?insertBefore@Node@@QAEPAV1@PAV1@0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class EntityReference * __thiscall Document::createEntityReference(unsigned char *)" (?createEntityReference@Document@@QAEPAVEntityReference@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class CDATASection * __thiscall Document::createCDATASection(unsigned char *)" (?createCDATASection@Document@@QAEPAVCDATASection@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class ProcessingInstruction * __thiscall Document::createProcessingInstruction(unsigned char *,unsigned char *)" (?createProcessingInstruction@Document@@QAEPAVProcessingInstruction@@PA
    E0@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Comment * __thiscall Document::createComment(unsigned char *)" (?createComment@Document@@QAEPAVComment@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Text * __thiscall Document::createTextNode(unsigned char *)" (?createTextNode@Document@@QAEPAVText@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Element * __thiscall XMLParser::getDocumentElement(void)" (?getDocumentElement@XMLParser@@QAEPAVElement@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Node * __thiscall Node::appendChild(class Node *)" (?appendChild@Node@@QAEPAV1@PAV1@@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Element * __thiscall Document::createElement(unsigned char *)" (?createElement@Document@@QAEPAVElement@@PAE@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall XMLParser::getDocument(void)" (?getDocument@XMLParser@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class Document * __thiscall XMLParser::createDocument(void)" (?createDocument@XMLParser@@QAEPAVDocument@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall XMLParser::xmlinit(unsigned char *,void (__cdecl*)(void *,unsigned char const *,unsigned int),void *,struct xmlsaxcb *,void *,unsigned char *)" (?xmlinit@XMLPar
    ser@@QAEIPAEP6AXPAXPBEI@Z1PAUxmlsaxcb@@10@Z)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall Node::numChildNodes(void)" (?numChildNodes@Node@@QAEIXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: class NodeList * __thiscall Node::getChildNodes(void)" (?getChildNodes@Node@@QAEPAVNodeList@@XZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Node::hasChildNodes(void)" (?hasChildNodes@Node@@QAEHXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Attr::getValue(void)" (?getValue@Attr@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: int __thiscall Attr::getSpecified(void)" (?getSpecified@Attr@@QAEHXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Attr::getName(void)" (?getName@Attr@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Node::getValue(void)" (?getValue@Node@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: unsigned char * __thiscall Node::getName(void)" (?getName@Node@@QAEPAEXZ)
    FullDOM.obj : error LNK2001: unresolved external symbol "public: short __thiscall Node::getType(void)" (?getType@Node@@QAEFXZ)
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/orafulldom.exe : fatal error LNK1120: 64 unresolved externals
    Error executing link.exe.
    orafulldom.exe - 65 error(s), 0 warning(s)
    null

Maybe you are looking for