<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [Windows toolchain] Developer Command Prompt for VS2012 clang++ link fails"
   href="http://llvm.org/bugs/show_bug.cgi?id=17428">17428</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Windows toolchain] Developer Command Prompt for VS2012 clang++ link fails
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bdawes@acm.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11312" name="attach_11312" title="Output from clang++ showing link failures">attachment 11312</a> <a href="attachment.cgi?id=11312&action=edit" title="Output from clang++ showing link failures">[details]</a></span>
Output from clang++ showing link failures

Running under the "Developer Command Prompt for VS2012", this program:

#include <iostream>
int main()
{
  std::cout << "Hello, world\n";
}

compiles and runs fine with VC++ 2012, using the command lines:

<span class="quote">>cl hello.cpp
>hello</span >

using the command line:

<span class="quote">>clang++ hello.cpp</span >

It compiles OK, but the link fails with messages like:

hello-111ee3.o : error LNK2019: unresolved external symbol __ZSt4cout
referenced in function _main

Attached is the output file created by this command line:

<span class="quote">>clang++ -v hello.cpp >clang++.log 2>&1</span >

Feel free to contact me for more information.

--Beman Dawes</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>