Clang++ can't seem to build a simple hello world program on windows.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang++ can't seem to build a simple hello world program on windows.

crazygamealexs
C:\Users\alex\Desktop>clang++ -nostdinc -I C:\MinGW\lib\gcc\mingw32\4.4.0\inclu
e\c++ hello.cpp
In file included from hello.cpp:2:
C:\MinGW\lib\gcc\mingw32\4.4.0\include\c++/iostream:38:10: fatal error:
      'bits/c++config.h' file not found
#include <bits/c++config.h>
         ^
Assertion failed: TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth
> 0", file C:\Users\alex\Desktop\llvm\tools\clang\lib\Sema\SemaTemplateDeductio
.cpp, line 436
 
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
clang++: error: clang frontend command failed with exit code 3 (use -v to see i
vocation)
 
Am I doing something wrong?

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang++ can't seem to build a simple hello world program on windows.

Douglas Gregor

On Aug 15, 2010, at 12:17 PM, [hidden email] wrote:

C:\Users\alex\Desktop>clang++ -nostdinc -I C:\MinGW\lib\gcc\mingw32\4.4.0\inclu
e\c++ hello.cpp
In file included from hello.cpp:2:
C:\MinGW\lib\gcc\mingw32\4.4.0\include\c++/iostream:38:10: fatal error:
      'bits/c++config.h' file not found
#include <bits/c++config.h>
         ^
Assertion failed: TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth
> 0", file C:\Users\alex\Desktop\llvm\tools\clang\lib\Sema\SemaTemplateDeductio
.cpp, line 436
 
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
clang++: error: clang frontend command failed with exit code 3 (use -v to see i
vocation)
 
Am I doing something wrong?

The assertion is unfortunate, but the basic problem is that Clang can't find all of the mingw headers. Look at where <bits/c++config.h> resides, and make sure to add an -I for that location to your command line.

- Doug


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev