[LLVMbugs] [Bug 6447] New: Building C++ app fails with link error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 1 05:22:29 PST 2010


           Summary: Building C++ app fails with link error
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: jpakkane at gmail.com
                CC: llvmbugs at cs.uiuc.edu

I try to build Cuneiform OCR system with clang but it fails. Here's how to
duplicate using the latest bzr:

bzr branch lp:cuneiform-linux cf
cd cf
mkdir builddir
cd builddir
CC=/path/to/clang CXX=/path/to/clang++ cmake -DCMAKE_BUILD_TYPE=debug ..

Eventually you get this error:

Linking CXX executable ../../cuneiform
../Kern/cpage/libcpage.so.0.9.0: undefined reference to `BLOCK::~BLOCK()'
collect2: ld returned 1 exit status

But BLOCK::~BLOCK is defined in cuneiform_src/Kern/cpage/sources/cpp/block.h:

class BLOCK: public DATA
[stuff removed]

    virtual ~BLOCK();

and its (empty) implementation is in the corresponding block.cpp:


And this file even gets included in the CMakeLists.txt.

The same code does work with GCC, MinGW, and MSVC.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list