User forums > Help
Compiling (building) - order of, exclude from etc.
zrno:
Hi,
I started using CodeBlocks three days ago and love it. But, I haven't been able to figure out one really simple thing - how does compiling of projects with multiple files work? Do I need to right-click every file and uncheck "compile file" and "link file"? I have A LOT of files I'd like to import from VS and it's gonna be a huge pain in the butt if I have to do it that way.
oBFusCATed:
.cpp/.c/.d files are compiled and linked by default, you just have to add them to the project.
zrno:
Damn, I just realized how stupid my post was ;D
What I meant to write was how do I set files so that they don't compile? I've imported some files from VS and I keep getting the "multiple definition of main" error, and if I only import one file, it works. All the files work in VS, so it leads me to believe that the problem is all of them are set to be compiled. So, I need to set them all (except one) to not compile.
oBFusCATed:
As far as I know there is no difference between VS and C::B in this regard.
Probably you can use multiple targets and to add only the files need for a particular target.
zrno:
Well, I added the files, but they are all set to compile by default, and that causes errors. How do I set them all not to compile in one go? Otherwise I have to right click on each file and set it to not compile.
Navigation
[0] Message Index
[#] Next page
Go to full version