LLVM : Clang : 3.8.0 (trunk) : Windows 7 64-bit : libc++ missing?

Hi,

I have to run Windows 7 Professional 64-bit (due unforeseen circumstances) instead of my preferred OS, i.e. FreeBSD.

I just downloaded the Clang toolkit environment installer (LLVM-3.8.0-r243265-win64) for Windows (from http://www.llvm.org/builds/) and post finishing the install found that clang++.exe refuses to compile even a simple C++ program (below);

int main(int argc, char* argv) {
     return 0;
}

The error messages thrown out were (below);

clang++.exe: error: unable to execute command: program not executable
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

Before this, I tried compiling a more fleshed out program with "includes" and "namespaces" and "cout", etc., but then clang++.exe told me about absence of "iostream".

Isn't "iostream" a part of "libc++"?
If yes, is there any pre-built "libc++" installable for Windows?
If not, is there any documentation which shows how to get it compiled under Windows?

Thanks,

~Mayuresh

I have to run Windows 7 Professional 64-bit (due unforeseen circumstances)
instead of my preferred OS, i.e. FreeBSD.

I just downloaded the Clang toolkit environment installer
(LLVM-3.8.0-r243265-win64) for Windows (from http://www.llvm.org/builds/)
and post finishing the install found that clang++.exe refuses to compile
even a simple C++ program (below);

int main(int argc, char* argv) {
    return 0;
}

The error messages thrown out were (below);

clang++.exe: error: unable to execute command: program not executable
clang++.exe: error: linker command failed with exit code 1 (use -v to see
invocation)

Before this, I tried compiling a more fleshed out program with "includes"
and "namespaces" and "cout", etc., but then clang++.exe told me about
absence of "iostream".

Isn't "iostream" a part of "libc++"?
If yes, is there any pre-built "libc++" installable for Windows?
If not, is there any documentation which shows how to get it compiled under
Windows?

Yeah, you need to download and build libcxx in addition to LLVM, Clang
(CFE), and Tools.

You can find libcxx at http://libcxx.llvm.org/.

Also, the Autotools/Make based stuff does not work because it does not
detect the presence of libcxx in-tree (or is it out-of-tree?). Use the
Cmake gear instead.

Ditto for LLDB if you choose to build it, too.

Jeff

Thanks for the response.

Is there any documentation anywhere which would show me how to build libc++?

Also, what should I have installed on my system other than Clang/LLVM to be able to build libc++ itself? Haven't found any traces of Cmake on my Windows 7 install.

~Mayuresh

If not, is there any documentation which shows how to get it compiled
under
Windows?

Yeah, you need to download and build libcxx in addition to LLVM, Clang
(CFE), and Tools.

You can find libcxx at http://libcxx.llvm.org/.

Also, the Autotools/Make based stuff does not work because it does not
detect the presence of libcxx in-tree (or is it out-of-tree?). Use the
Cmake gear instead.

Ditto for LLDB if you choose to build it, too.

Thanks for the response.

Is there any documentation anywhere which would show me how to build libc++?

Also, what should I have installed on my system other than Clang/LLVM to be
able to build libc++ itself? Haven't found any traces of Cmake on my Windows
7 install.

Oh, sorry about that... my bad... I did not tune into the Windows part.

I've been working with Cygwin and MinGW recently, and made the leap
that you were doing Linux on Windows. I did not realize it was real
Windows on Windows. (after a few days with Cygwin and MinGW, I really
miss plain old Windows).

Jeff

No worries, happens to the best of us. :slight_smile:

If you know of any ways to get me started off in the right direction, please do share.
BTW, I checked out "Cmake"; nice tool, thanks for that tip.

~Mayuresh