Testing Clang on Win32

Hi,

I built Clang using the “Getting Started” & “Using Visual Studio” section.

A brief on my Platform:
Intel Pentium D
Microsoft Windows XP Service Pack 3

Installed Compilers:
Microsoft Visual Studio 9.0
Microsoft Visual Studio 10.0

I ran cmake like the following

cmake -G “Visual Studio 9 2008” .

I am trying to compile a simple C++ Hello World code.

//helloworld.cpp
#include

int main( /*int argc, char *argv/ )
{
std::cout << “hello world\n”;
return 0;
}

When I compiled helloword.cpp, I got errors from Visual Studio 10 Include Directory.
Is there any way to specify to Clang where the Include directory is? I like to use the MSVC 9.0 Include Dir.
How does Clang to assume that the compiler is VS2010? Remember that I chose – cmake -G “Visual Studio 9 2008” . –

Thanks,
Fernando.

AMDG

Let's try CC'ing the list...

Fernando Pelliccioni wrote:

I built Clang using the "Getting Started" & "Using Visual Studio" section.

A brief on my Platform:
    Intel Pentium D
    Microsoft Windows XP Service Pack 3

    Installed Compilers:
        Microsoft Visual Studio 9.0
        Microsoft Visual Studio 10.0

I ran cmake like the following

        cmake -G "Visual Studio 9 2008" .

I am trying to compile a simple C++ Hello World code.

    //helloworld.cpp
    #include <iostream>

    int main( /*int argc, char **argv*/ )
    {
        std::cout << "hello world\n";
        return 0;
    }

When I compiled helloword.cpp, I got errors from Visual Studio 10 Include
Directory.
Is there any way to specify to Clang where the Include directory is? I like
to use the MSVC 9.0 Include Dir.
How does Clang to assume that the compiler is VS2010? Remember that I chose
-- cmake -G "Visual Studio 9 2008" . --
  
Are you using the current svn? I thought that when I made
the patch to find MSVC 10.0 headers, that it should favor
the headers from the version that clang was compiled with.
The headers from both versions are rather broken with clang,
but the 10.0 headers are more broken, since they rely on
C++0x features.

In Christ,
Steven Watanabe

AMDG

Let’s try CC’ing the list…

Fernando Pelliccioni wrote:

I built Clang using the “Getting Started” & “Using Visual Studio” section.

A brief on my Platform:
Intel Pentium D
Microsoft Windows XP Service Pack 3

Installed Compilers:
Microsoft Visual Studio 9.0
Microsoft Visual Studio 10.0

I ran cmake like the following

cmake -G “Visual Studio 9 2008” .

I am trying to compile a simple C++ Hello World code.

//helloworld.cpp
#include

int main( /*int argc, char *argv/ )
{
std::cout << “hello world\n”;
return 0;
}

When I compiled helloword.cpp, I got errors from Visual Studio 10 Include
Directory.
Is there any way to specify to Clang where the Include directory is? I like
to use the MSVC 9.0 Include Dir.
How does Clang to assume that the compiler is VS2010? Remember that I chose
– cmake -G “Visual Studio 9 2008” . –

Are you using the current svn?

Yes, I am using the current SVN ( actually from las week ).

I thought that when I made
the patch to find MSVC 10.0 headers, that it should favor
the headers from the version that clang was compiled with.

The headers from both versions are rather broken with clang,
but the 10.0 headers are more broken, since they rely on
C++0x features.

So, no chance of using Clang in Windows?
What about MinGW ? Is it working?

Regards,
Fernando.

Sorry, I have a pseudo-off topic question.

I like to test Clang on Darwin.
Anyone know how I can install Darwin OS on Intel? I can not find the installation CD anywhere.

Thanks,
Fernando.

If you don't want to hack around clang I suggest you use MinGW if you
are on windows. Yes it should work better than MSVC.

clang cannot compile headers file from MSVC 2008 or 2010 because some
Microsoft-extensions are not currently implemented in clang. I am
slowly working on this as a hobby. I don't think MSVC compatibility is
a priority for the main clang developers so it might take a while.

If you don’t want to hack around clang I suggest you use MinGW if you
are on windows. Yes it should work better than MSVC.

I have no experience in compilers, but with your help I can contribute to the project. I would like !!

clang cannot compile headers file from MSVC 2008 or 2010 because some
Microsoft-extensions are not currently implemented in clang. I am
slowly working on this as a hobby. I don’t think MSVC compatibility is
a priority for the main clang developers so it might take a while.

Are there any plans to write the C++ Standard Library (and other languages) to be included with Clang?

As I said, I would like to contribute to the project, especially in regard to C++.
I will check the Open Projects. Let me know if you need help in something…

Regards,
Fernando.

http://libcxx.llvm.org/