http://llvm.org/bugs/show_bug.cgi?id=7376

           Summary: Clang produces linker error on explicit template
                    instantiation
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


When compiling the attached files with clang, it produces the following linker
error:

template.os:(.gnu.linkonce.d.rel.ro._ZTV1BIiE+0x8): undefined reference to
`typeinfo for B<int>'
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see
invocation)

This works without problems when compiling with g++ (Ubuntu 4.4.3-4ubuntu5)
4.4.3.

Commands used to build:

clang++ -c -o template.o template.cc
clang++ -c -o main.o main.cc
clang++ -o template main.os template.os

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to