[cfe-dev] Error in included files

Richard Smith richard at metafoo.co.uk
Sun Oct 13 13:07:33 PDT 2013


On Sat, Oct 12, 2013 at 5:58 AM, AndyFor <borucki.andrzej at gmail.com> wrote:

> I have successfully compiled llvm and clang under Mingw and Windows XP. In
> Code::Blocks I created first simple project:
> #include <iostream>
>
> using namespace std;
>
> int main()
> {
>     cout << "Hello world!" << endl;
>     return 0;
> }
> iostream is in C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\, I add this
> directory and others to compiler direcories.
> When I build, I have errors:
> C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\cwchar|66|error:
> no
> member named 'mbstate_t' in the global namespace|
>
> log:
> clang++.exe -Weverything -fexceptions  -g    -I"C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++" -I"C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\mingw32"
> -I"C:\Program Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\tr1"
>

These -I arguments are very suspicious. You generally shouldn't (need to)
give -I arguments pointing at the standard library; your problem is almost
certainly something wrong with your include paths.


> -c c:\temp\aa\main.cpp -o obj\Debug\main.o
> In file included from c:\temp\aa\main.cpp:1:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\iostream:40:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\ostream:40:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\ios:39:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\iosfwd:42:
> In file included from C:\Program
>
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\bits/postypes.h:42:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\cwchar:46:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\tr1\wchar.h:32:
> In file included from C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\tr1/cwchar:34:
> C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\cwchar:66:11:
> error: no member named 'mbstate_t' in the global namespace
>   using ::mbstate_t;
> C:\Program
> Files\CodeBlocks\MinGW\lib\gcc\mingw32\4.7.1\include\c++\cwchar:141:11:
> error: no member named 'wint_t' in the global namespace
>   using ::wint_t;
> etc
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Error-in-included-files-tp4035083.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131013/c5ebdd30/attachment.html>


More information about the cfe-dev mailing list