[LLVMbugs] [Bug 7276] New: C++ programs compiled with clang++ fail to link on cygwin

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 1 08:17:23 PDT 2010


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

           Summary: C++ programs compiled with clang++ fail to link on
                    cygwin
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: eric at boostpro.com
                CC: llvmbugs at cs.uiuc.edu


stock install of cygwin. clang++ built from trunk (5/31/2010).

Eric at AERIX ~
$ cat test.cpp
#include <iostream>
int main()
{
  std::cout << "hello clang\n";
}

Eric at AERIX ~
$ clang test.cpp
/cygdrive/c/Users/Eric/AppData/Local/Temp/cc-lHUHtT.o:fake:(.text+0x1f):
undefined reference to `___dso_handle'
/cygdrive/c/Users/Eric/AppData/Local/Temp/cc-lHUHtT.o:fake:(.text+0x32):
undefined reference to `___cxa_atexit'
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see
invocation)


If I take out the #include and the write to std::cout, it compiles and links
OK.

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