Author Topic: Best way to add classes  (Read 3622 times)

gabon

  • Guest
Best way to add classes
« on: June 09, 2008, 12:33:21 pm »
Hi guys, I'm not expert in C++. What I always find difficult in the various IDE, maybe less in X-Code, is to reference libraries or class folders in a project. In CodeBlocks I added files and folder from the management folder. Those are listed in a very long hierarchy starting from "Source" and "Headers". Anyway, that wouldn't be a particular problem, the problem is that on compiling I get "xxx.h: No such file or directory.
I use Code Blocks for windows with MinGW and if I check the "project properties/Build targets", the files that I'm trying to include are listed in the build targets files and they have the right path. Funny enough in the IDE I get also suggestions about their methods on typing. I'm using GNU GCC Compiler.

What am I missing, and what would be the recommended way to include classes in a project?

Thanks, chr

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Best way to add classes
« Reply #1 on: June 09, 2008, 01:07:26 pm »
Hi !

You have to fill the compiler search directory to help him find your headers.
The same for the linker/libs.

You'll find that in the project build options.

Dje

gabon

  • Guest
Re: Best way to add classes
« Reply #2 on: June 10, 2008, 04:38:08 pm »
Thanks Dje, adding the new source folders there helped.

Best, chr