[cfe-users] about using clang on windows
David Blaikie
dblaikie at gmail.com
Tue Dec 11 10:01:41 PST 2012
[taking this back to the list so others can learn from it & contribute]
I honestly don't know what the state of Clang's windows support is.
But I believe we're getting better - though there's been some
discussion about these intrinsics lately, so they may not be
implemented yet.
Essentially: compiling arbitrary windows code (even the standard
windows headers) is 'hard', it's not necessarily standards
compliant/portable so Clang might not get all of it.
Others might be able to chime in with the current state of affairs in
this regard.
On Tue, Dec 11, 2012 at 9:56 AM, aj3423 <aj3423 at gmail.com> wrote:
> Thanks.
>
> I tried to compile a very simple cpp, seems clang isn't working correctly on
> my machine:
>
> #pragma warning(disable: 4002 4018 4244 4996)
> #include "windows.h"
> #include <functional>
> #include <sstream>
> #include <iostream>
> #include <string>
> #include <fstream>
> #include <random>
> using namespace std;
>
> int main() {
> }
>
> there's a lot of error:
> G:\workspace\test3>clang++ -c test3.cpp
> In file included from test3.cpp:3:
> In file included from G:\vs\VC\INCLUDE\functional:6:
> In file included from G:\vs\VC\INCLUDE\xfunctional:7:
> In file included from G:\vs\VC\INCLUDE\xstring:6:
> In file included from G:\vs\VC\INCLUDE\xmemory0:9:
> In file included from G:\vs\VC\INCLUDE\xutility:8:
> In file included from G:\vs\VC\INCLUDE\utility:8:
> G:\vs\VC\INCLUDE\type_traits:1072:33: error: '_Ty' does not refer to a value
> _HAS_TRIVIAL_MOVE_CONSTRUCTOR(_Ty)
> ^
> G:\vs\VC\INCLUDE\type_traits:52:38: note: expanded from macro
> '_HAS_TRIVIAL_MOVE_CONSTRUCTOR'
> && __has_trivial_move_constructor(_Ty)>
> ^
> G:\vs\VC\INCLUDE\type_traits:1070:16: note: declared here
>
> my environment is win7 32bit, clang and llvm are compiled using vs2012
>
> why is that?
>
>
> 2012/12/12 David Blaikie <dblaikie at gmail.com>
>>
>> On Tue, Dec 11, 2012 at 6:11 AM, aj3423 <aj3423 at gmail.com> wrote:
>> > Hi,
>> > I used to compile my programs using CMake + VS2012's NMake, the
>> > compiling is
>> > very simple:
>> >
>> > cmake -G "NMake Makefiles" ..
>> > nmake
>> >
>> > Now I found clang, can clang work with cmake and provide such easy way
>> > of
>> > compiling?
>>
>> CMake can use clang, yes.
>> http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools
>> (CMAKE_C_COMPILER and CMAKE_CXX_COMPILER)
>>
>> >
>> > Thanks.
>> >
>> > _______________________________________________
>> > cfe-users mailing list
>> > cfe-users at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
>> >
>
>
More information about the cfe-users
mailing list