Author Topic: Strange problem, probaly vista  (Read 11999 times)

c89c

  • Guest
Strange problem, probaly vista
« on: May 19, 2007, 07:45:19 am »
I use GCC and i have the latest version of Code::Blocks.  The thing is, it compiles fine except that it won't find any c++ header files and it has absolutely no idea where std is even if i use std::<function>.  It works right and finds cc1 and cc1plus, that's not problem. The compiler is set to the include directory, but try as i might (I even tried putting include in bin), nothing works.

Here's the error output for a simple console application:

Code
Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Users\Cooper\Documents\CCC Designs\SWP\src\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: maintest.cpp
In file included from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:44:28: bits/c++config.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46:29: bits/c++locale.h: No such file or directory
C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:47:25: bits/c++io.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:48,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:49:19: ctype.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:48,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:68: error: `::isalnum' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:69: error: `::isalpha' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:70: error: `::iscntrl' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:71: error: `::isdigit' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:72: error: `::isgraph' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:73: error: `::islower' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:74: error: `::isprint' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:75: error: `::ispunct' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:76: error: `::isspace' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:77: error: `::isupper' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:78: error: `::isxdigit' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:79: error: `::tolower' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cctype:80: error: `::toupper' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cwchar:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/postypes.h:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:48:20: stddef.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cwchar:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/postypes.h:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:52: error: `::ptrdiff_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:53: error: `::size_t' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cwchar:51,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/postypes.h:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:51:18: time.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cwchar:51,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/postypes.h:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:66: error: `::clock_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:67: error: `::time_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:68: error: `::tm' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:70: error: `::clock' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:71: error: `::difftime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:72: error: `::mktime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:73: error: `::time' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:74: error: `::asctime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:75: error: `::ctime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:76: error: `::gmtime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:77: error: `::localtime' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/ctime:78: error: `::strftime' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:50,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/postypes.h:78: error: `ptrdiff_t' does not name a type
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/char_traits.h:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:51:20: string.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/bits/char_traits.h:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:79: error: `::memcpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:80: error: `::memmove' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:81: error: `::strcpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:82: error: `::strncpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:83: error: `::strcat' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:84: error: `::strncat' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:85: error: `::memcmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:86: error: `::strcmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:87: error: `::strcoll' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:88: error: `::strncmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:89: error: `::strxfrm' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:90: error: `::strcspn' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:91: error: `::strspn' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:92: error: `::strtok' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:93: error: `::memset' has not been declared

That's when the library path is set to C:/program files/codeblocks/include/c++/3.4.4/. Below is when it's set to C:/program files/codeblocks/include/.

Code
Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Users\Cooper\Documents\CCC Designs\SWP\src\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: maintest.cpp
maintest.cpp:1:20: iostream: No such file or directory
maintest.cpp:2:18: string: No such file or directory
maintest.cpp: In function `int main()':
maintest.cpp:6: error: `cout' is not a member of `std'
maintest.cpp:6: error: `endl' is not a member of `std'
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings
 

here's the code that both use:

Code
#include <iostream>
#include <string>

int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}

Not at all complicated.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Strange problem, probaly vista
« Reply #1 on: May 19, 2007, 04:11:03 pm »
In addition to [...]\include\c++\3.4.4, add [...]\include\c++\3.4.4\mingw32.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

c89c

  • Guest
Re: Strange problem, probaly vista
« Reply #2 on: May 19, 2007, 05:42:13 pm »
No Dice. I set my settings->compiler->directories to this:

Code
C:\Program Files\CodeBlocks\include\c++\3.4.4\
C:\Program Files\CodeBlocks\include\c++\3.4.4\mingw32

and i still get this:

Code
Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Users\Cooper\Documents\CCC Designs\SWP\src\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: maintest.cpp
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:41,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:49:20: locale.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:41,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:57: error: `::lconv' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:58: error: `::setlocale' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:59: error: `::localeconv' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:48:20: stddef.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:52: error: `::ptrdiff_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:53: error: `::size_t' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:51:20: string.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:79: error: `::memcpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:80: error: `::memmove' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:81: error: `::strcpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:82: error: `::strncpy' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:83: error: `::strcat' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:84: error: `::strncat' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:85: error: `::memcmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:86: error: `::strcmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:87: error: `::strcoll' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:88: error: `::strncmp' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:89: error: `::strxfrm' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:90: error: `::strcspn' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:91: error: `::strspn' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:92: error: `::strtok' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:93: error: `::memset' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:94: error: `::strerror' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:95: error: `::strlen' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:97: error: `::memchr' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:100: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring: In function `void* std::memchr(void*, int, int)':
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:101: error: invalid conversion from `const void*' to `void*'
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:101: error:   initializing argument 1 of `void* std::memchr(void*, int, int)'
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring: At global scope:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:103: error: `::strchr' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:109: error: `::strpbrk' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:115: error: `::strrchr' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:121: error: `::strstr' has not been declared
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:43,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:52:19: stdio.h: No such file or directory
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:43,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from maintest.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:99: error: `::FILE' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:100: error: `::fpos_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:102: error: `::clearerr' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:103: error: `::fclose' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:104: error: `::feof' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:105: error: `::ferror' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:106: error: `::fflush' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:107: error: `::fgetc' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:108: error: `::fgetpos' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:109: error: `::fgets' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:110: error: `::fopen' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:111: error: `::fprintf' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:112: error: `::fputc' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:113: error: `::fputs' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:114: error: `::fread' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstdio:115: error: `::freopen' has not been declared
Process terminated with status 1 (0 minutes, 13 seconds)
52 errors, 0 warnings
 

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Strange problem, probaly vista
« Reply #3 on: May 19, 2007, 07:46:10 pm »
You lost the root include directory somewhere along the line; it needs to be in there too. (C:\Program Files\CodeBlocks\include)
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

c89c

  • Guest
Re: Strange problem, probaly vista
« Reply #4 on: May 20, 2007, 01:11:12 am »
still no dice. My current settings->compiler->directories is below along with the error code.

Code
C:\Program Files\CodeBlocks\include
C:\Program Files\CodeBlocks\include\c++\3.4.4\mingw32
C:\Program Files\CodeBlocks\include\c++\3.4.4

Directories above --- error below

Code
Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Users\Cooper\Documents\CCC Designs\test\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from C:/Program Files/CodeBlocks/include/locale.h:40,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:41,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
In file included from C:/Program Files/CodeBlocks/include/locale.h:76,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/clocale:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:41,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:48,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:49,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:52: error: `::ptrdiff_t' has not been declared
C:/Program Files/CodeBlocks/include/c++/3.4.4/cstddef:53: error: `::size_t' has not been declared
In file included from C:/Program Files/CodeBlocks/include/string.h:24,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:51,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/stddef.h:6:24: no include path in which to search for stddef.h
In file included from C:/Program Files/CodeBlocks/include/c++/3.4.4/cstring:51,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/mingw32/bits/c++locale.h:42,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iosfwd:46,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ios:44,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/ostream:45,
                 from C:/Program Files/CodeBlocks/include/c++/3.4.4/iostream:45,
                 from main.cpp:1:
C:/Program Files/CodeBlocks/include/string.h:36: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:37: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:38: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:39: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:40: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:46: error: expected constructor, destructor, or type conversion before "strcspn"
C:/Program Files/CodeBlocks/include/string.h:46: error: expected `,' or `;' before "strcspn"
C:/Program Files/CodeBlocks/include/string.h:49: error: expected constructor, destructor, or type conversion before "strlen"
C:/Program Files/CodeBlocks/include/string.h:49: error: expected `,' or `;' before "strlen"
C:/Program Files/CodeBlocks/include/string.h:50: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:51: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:52: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:55: error: expected constructor, destructor, or type conversion before "strspn"
C:/Program Files/CodeBlocks/include/string.h:55: error: expected `,' or `;' before "strspn"
C:/Program Files/CodeBlocks/include/string.h:58: error: expected constructor, destructor, or type conversion before "strxfrm"
C:/Program Files/CodeBlocks/include/string.h:58: error: expected `,' or `;' before "strxfrm"
C:/Program Files/CodeBlocks/include/string.h:65: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:66: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:72: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:73: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:77: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:80: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:81: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:90: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:91: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:100: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:102: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:104: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:109: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:125: error: expected constructor, destructor, or type conversion before "wcscspn"
C:/Program Files/CodeBlocks/include/string.h:125: error: expected `,' or `;' before "wcscspn"
C:/Program Files/CodeBlocks/include/string.h:127: error: expected constructor, destructor, or type conversion before "wcslen"
C:/Program Files/CodeBlocks/include/string.h:127: error: expected `,' or `;' before "wcslen"
C:/Program Files/CodeBlocks/include/string.h:128: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:129: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:130: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:133: error: expected constructor, destructor, or type conversion before "wcsspn"
C:/Program Files/CodeBlocks/include/string.h:133: error: expected `,' or `;' before "wcsspn"
C:/Program Files/CodeBlocks/include/string.h:136: error: expected constructor, destructor, or type conversion before "wcsxfrm"
C:/Program Files/CodeBlocks/include/string.h:136: error: expected `,' or `;' before "wcsxfrm"
C:/Program Files/CodeBlocks/include/string.h:150: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:151: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:157: error: `size_t' has not been declared
C:/Program Files/CodeBlocks/include/string.h:158: error: `size_t' has not been declared
Process terminated with status 1 (0 minutes, 15 seconds)
52 errors, 0 warnings
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Strange problem, probaly vista
« Reply #5 on: May 20, 2007, 02:26:32 am »
still no dice. My current settings->compiler->directories is below along with the error code.

Code
C:\Program Files\CodeBlocks\include
C:\Program Files\CodeBlocks\include\c++\3.4.4\mingw32
C:\Program Files\CodeBlocks\include\c++\3.4.4


The place I read somewhere suggest the below include also, note not using vista, but the settings help with the non-official GCC builds for me.

C:\Program Files\CodeBlocks\lib\gcc\mingw32\3.4.4\include

I am also using different order, no idea if it make a diffrence.

Code
C:\Program Files\CodeBlocks\include
C:\Program Files\CodeBlocks\include\c++\3.4.4
C:\Program Files\CodeBlocks\include\c++\3.4.4\mingw32
C:\Program Files\CodeBlocks\lib\gcc\mingw32\3.4.4\include

Linker search list
Code
C:\Program Files\CodeBlocks\lib
C:\Program Files\CodeBlocks\lib\gcc\mingw32\3.4.4

Tim S

PS: My minGW is installed in a path with no spaces since some programs has issues with spaces.
« Last Edit: May 20, 2007, 02:30:33 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

c89c

  • Guest
Re: Strange problem, probaly vista
« Reply #6 on: May 20, 2007, 03:00:02 am »
It certainly helps stahta01, thanks. i'm down to only one error.
For my compiler/linker settings see stahta01's post.

Code
Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Users\Cooper\Documents\CCC Designs\test\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking console executable: C:\Users\Cooper\Documents\CCC Designs\test\console.exe
ld: crt2.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 4 seconds)
0 errors, 0 warnings

I seem to remember getting that a lot sometimes for no apparent reason.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Strange problem, probaly vista
« Reply #7 on: May 20, 2007, 03:11:49 am »
Do you have
Code
C:\Program Files\CodeBlocks\libexec\gcc\mingw32\3.4.4

In additional paths?

The setting is under "toolchain Executable"

Note, you normally would get a different error if you don't have it, but I just an trying all that I can from my setup.

Tim S
« Last Edit: May 20, 2007, 03:14:32 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

c89c

  • Guest
Re: Strange problem, probaly vista
« Reply #8 on: May 20, 2007, 04:48:49 am »
I did what you said and added it to additional paths under settings->compiler->programs->additional paths and it didn't change anything. same error.

Code
Switching to target: default
Compiling: main.cpp
Linking console executable: C:\Users\Cooper\Documents\CCC Designs\test\console.exe
ld: crt2.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Strange problem, probaly vista
« Reply #9 on: May 20, 2007, 04:59:56 am »
I did what you said and added it to additional paths under settings->compiler->programs->additional paths and it didn't change anything. same error.

Code
Switching to target: default
Compiling: main.cpp
Linking console executable: C:\Users\Cooper\Documents\CCC Designs\test\console.exe
ld: crt2.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings

Are you willing to try minGW 3.4.5 version on Vista?
Is yes, see this thread. It assumes that 3.4.5 is already installed on the computer.
http://forums.codeblocks.org/index.php/topic,5939.0.html

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