User forums > General (but related to Code::Blocks)

Getting C++ to compile (vector no such file) "make" works but not CB

(1/1)

foldingBLACKlinesSUCK:
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"

--- End code ---

Any help?

ollydbg:
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

foldingBLACKlinesSUCK:

--- Quote from: 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

--- End quote ---

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)

ollydbg:
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 :(

stahta01:

--- Quote from: 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"

--- End code ---

Any help?

--- End quote ---

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

Navigation

[0] Message Index

Go to full version