Author Topic: MinGW has lost Std  (Read 8076 times)

danharibo

  • Guest
MinGW has lost Std
« on: January 12, 2008, 07:07:14 pm »
I'm trying to use <string>, but when i try and include it, MinGW decides it can't find it.
So i add the folder that string is in, but then i get these errors:
Code
C:\MinGW\include\c++\3.4.5\string:45: bits/c++config.h: No such file or directory
C:\MinGW\include\c++\3.4.5\bits\stringfwd.h:46: error: syntax error before "std"
C:\MinGW\include\c++\3.4.5\bits\stringfwd.h:47: error: syntax error before '{' token
C:\MinGW\include\c++\3.4.5\bits\stringfwd.h:60: error: syntax error before '<' token
C:\MinGW\include\c++\3.4.5\cstddef:50: error: syntax error before "std"
C:\MinGW\include\c++\3.4.5\cstddef:51: error: syntax error before '{' token
C:\MinGW\include\c++\3.4.5\cstring:78: error: syntax error before '{' token
C:\MinGW\include\c++\3.4.5\cstring:101: error: conflicting types for 'memchr'
C:\MinGW\include\string.h:36: error: previous declaration of 'memchr' was here
C:\MinGW\include\c++\3.4.5\cstring:101: error: conflicting types for 'memchr'
C:\MinGW\include\string.h:36: error: previous declaration of 'memchr' was here
C:\MinGW\include\c++\3.4.5\cstring:101: error: `const_cast' undeclared (first use in this function)
C:\MinGW\include\c++\3.4.5\cstring:101: error: (Each undeclared identifier is reported only once
C:\MinGW\include\c++\3.4.5\cstring:101: error: for each function it appears in.)
C:\MinGW\include\c++\3.4.5\cstring:101: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\cstring:103: error: syntax error before ':' token
C:\MinGW\include\c++\3.4.5\cstring:107: error: conflicting types for 'strchr'
C:\MinGW\include\c++\3.4.5\cstring:107: error: conflicting types for 'strchr'
C:\MinGW\include\c++\3.4.5\cstring:107: error: `const_cast' undeclared (first use in this function)
C:\MinGW\include\c++\3.4.5\cstring:107: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\cstring:109: error: syntax error before ':' token
C:\MinGW\include\c++\3.4.5\cstring:113: error: conflicting types for 'strpbrk'
C:\MinGW\include\c++\3.4.5\cstring:113: error: conflicting types for 'strpbrk'
C:\MinGW\include\c++\3.4.5\cstring:113: error: `const_cast' undeclared (first use in this function)
C:\MinGW\include\c++\3.4.5\cstring:113: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\cstring:115: error: syntax error before ':' token
C:\MinGW\include\c++\3.4.5\cstring:119: error: conflicting types for 'strrchr'
C:\MinGW\include\c++\3.4.5\cstring:119: error: conflicting types for 'strrchr'
C:\MinGW\include\c++\3.4.5\cstring:119: error: `const_cast' undeclared (first use in this function)
C:\MinGW\include\c++\3.4.5\cstring:119: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\cstring:121: error: syntax error before ':' token
C:\MinGW\include\c++\3.4.5\cstring:125: error: conflicting types for 'strstr'
C:\MinGW\include\c++\3.4.5\cstring:125: error: conflicting types for 'strstr'
C:\MinGW\include\c++\3.4.5\cstring:125: error: `const_cast' undeclared (first use in this function)
C:\MinGW\include\c++\3.4.5\cstring:125: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\cstdlib:85: error: syntax error before '{' token
C:\MinGW\include\c++\3.4.5\cstdlib:123: error: conflicting types for 'abs'
C:\MinGW\include\c++\3.4.5\cstdlib:123: error: conflicting types for 'abs'
C:\MinGW\include\c++\3.4.5\cstdlib:126: error: conflicting types for 'div'
C:\MinGW\include\stdlib.h:376: error: previous declaration of 'div' was here
C:\MinGW\include\c++\3.4.5\cstdlib:126: error: conflicting types for 'div'
C:\MinGW\include\stdlib.h:376: error: previous declaration of 'div' was here
C:\MinGW\include\c++\3.4.5\cstdlib:127: error: syntax error before '}' token
C:\MinGW\include\c++\3.4.5\exception:59: error: syntax error before "const"
C:\MinGW\include\c++\3.4.5\exception:60: error: syntax error before '}' token
C:\MinGW\include\c++\3.4.5\exception:74: error: storage class specified for parameter `terminate_handler'
C:\MinGW\include\c++\3.4.5\exception:76: error: storage class specified for parameter `unexpected_handler'
C:\MinGW\include\c++\3.4.5\exception:79: error: syntax error before "terminate_handler"
C:\MinGW\include\c++\3.4.5\exception:85: error: syntax error before "unexpected_handler"
C:\MinGW\include\c++\3.4.5\exception:100: error: syntax error before "bool"
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===
The weird thing is, It was working last week..

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7786
    • My Best Post
Re: MinGW has lost Std
« Reply #1 on: January 12, 2008, 08:05:39 pm »
No idea. Are you using Vista? If so, try the steps to fix MinGW again search in the Wiki.

Otherwise, I think I would look at you PATH for other compilers that might be causing issues.
Like an Cygwin in your path can cause issues.

If the above does not work, I would re-install MinGW.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: MinGW has lost Std
« Reply #2 on: January 12, 2008, 08:13:32 pm »
I'm trying to use <string>, but when i try and include it, MinGW decides it can't find it.
Are you sure you have installed the g++ compiler? (not only the gcc core)?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

danharibo

  • Guest
Re: MinGW has lost Std
« Reply #3 on: January 12, 2008, 08:23:07 pm »
I Removed the file and Re-Made the class, and the problem disapeared.
 :|
« Last Edit: January 12, 2008, 10:27:41 pm by danharibo »