Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: foldingBLACKlinesSUCK on March 08, 2009, 06:41:19 am

Title: Getting C++ to compile (vector no such file) "make" works but not CB
Post by: foldingBLACKlinesSUCK on March 08, 2009, 06:41:19 am
Hello,

I have Cygwin installed. I have set it up properly.


I am getting:

Code
C:/Cygwin/home/Computer/asdf/kool.c:11:18: vector: No such file or directory
C:/Cygwin/home/Computer/asdf/kool.c:13: error: parse error before "namespace"

Any help?
Title: Re: Getting C++ to compile (vector no such file) "make" works but not CB :(
Post by: ollydbg on March 08, 2009, 06:49:37 am
The compiler can't find the header file  "vector", so it seems your Cygwin was not installed correctly.
I haven't used Cygwin, I use MinGW instead, and it works quite well. :D
Title: Getting C++ to compile (vector no such file) "make" works but not CB :(
Post by: foldingBLACKlinesSUCK on March 08, 2009, 06:57:49 am
The compiler can't find the header file  "vector", so it seems your Cygwin was not installed correctly.
I haven't used Cygwin, I use MinGW instead, and it works quite well. :D

Fixed;I had to choose "this project uses a custom MAKEFILE".

But I have one problem; it seems to be rebuilding all files and not checking for changes in file and compiling only the changed files.... (even w/ Build)
Title: Re: Getting C++ to compile (vector no such file) "make" works but not CB
Post by: ollydbg on March 08, 2009, 07:10:11 am
I have built the OpenCV library(it is a big library, and use makefiles) under Mingw, If I change some source, only the source file modified will be compiled. So, it works OK in my system.

Maybe, the problem comes from your "Cygwin" or "Makefile script". But I'm not sure :(
Title: Re: Getting C++ to compile (vector no such file) "make" works but not CB
Post by: stahta01 on March 08, 2009, 07:52:22 am
Hello,

I have Cygwin installed. I have set it up properly.


I am getting:

Code
C:/Cygwin/home/Computer/asdf/kool.c:11:18: vector: No such file or directory
C:/Cygwin/home/Computer/asdf/kool.c:13: error: parse error before "namespace"

Any help?

"vector" is an C++ header. Code::Blocks defaults to treating .c files as "c" files NOT "c++" files.
Tim S