Hi,<br><br>I was wondering if libcxx works on Linux machines. From reading the archives it seems like some people have got it to work. It seems to compile fine for me but I get this error: <b>Could not resolve external global address: std::__1::cout</b><br>
Am I doing something wrong or should libcxx not work on linux yet?<br><br><br><span style="font-family: courier new,monospace;">john@ubuntu:~/src$ clang++ --version</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">clang version 3.0 (trunk 127576)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Target: x86_64-unknown-linux-gnu</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Thread model: posix</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">john@ubuntu:~/src$ clang++ -std=c++0x -stdlib=libc++ -emit-llvm -c -o world.bc world.cc</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">john@ubuntu:~/src$ chmod +x world.bc</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">john@ubuntu:~/src$ ./world.bc 2>&1 | c++filt</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">LLVM ERROR: Could not resolve external global address: std::__1::cout</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">john@ubuntu:~/src$ cat world.cc </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#include <iostream></span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">using namespace std;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">int main() {</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  cout << "hello world!\n";</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  return 0;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br>
<br><br>Thanks,<br>John<br>