Issue Compiling with Codeblocks

Hey guys. I'm pretty new to c++, and I originally started learning in Visual Studio Express. I wanted to switch to a free IDE, so I installed Code::Blocks. All is well, the issue is I get an error that more or less says "Function 'X' is undefined" when using more than one file (main.cpp where the function is called, a header where it is declared, and another .cpp where it is defined. This is something that worked easily for me in Visual Studeo, but not in Code::Blocks.

Help?
seppi562 wrote:
I'm pretty new to c++, and I originally started learning in Visual Studio Express. I wanted to switch to a free IDE, so I installed Code::Blocks.


Visual Studio Express is free.

As for your problem you must include the source file in your project, much like you would've done in VS.
Last edited on
1) Not if I want to distribute.

2) What do you mean? I didn't have to do anything like that in VS.
Not if I want to distribute.

What bit of nonsense are you basing that assumption on?


What do you mean? I didn't have to do anything like that in VS.

It is possible in VS to create a file and add it to your project simultaneously. Iirc, you must create the file, then add it to the project in CB. With pretty much any IDE the file must be a part of the project for it to be compiled and linked with the project.
Last edited on
> Visual Studio Express is free.
It is gratis
¿is it libre?
Topic archived. No new replies allowed.