News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

New to Code::Blocks (and IDEs in general!)

Started by Bytebro, August 08, 2019, 05:12:59 PM

Previous topic - Next topic

Bytebro

Hi,

I'm an experienced developer (40yrs+), but I'm pretty old school and have always just built a makefile that does what I want!

The scenario I'd like advice about is like this.  I have a bunch of source files which go together to build a library.  Fine, I have just set up a Code::Blocks project file that successfully build my library in both Release and Debug, which is great.  The thing is, I have a number of additional source files which each build a standalone exeutable, linked to my library, which each test specific features of the library.

What is the best, or 'accepted' structure for doing this?  I surely don't want to set up a project file for every single one of these testing tools.  Also of course, it would be sweet to be able to do the equivalent of my old makefile strategy where I would just go:

make lib
make check
make install

If anyone can point me at any resources where I learn more about structuring projects, and how to achieve what I'm trying to do, I'd be really grateful!

Thanks,
k

stahta01

If you do not wish to use a "Normal" CB Project.
Then I would suggest an "Custom Makefile" project, with different CB target for lib, check, and install.

If you do wish to use a "Normal" CB Project; I would still suggest a different CB target for lib, check, and install.

Tim S.


C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

gib

It sounds as if the OP is not familiar with the process to create multiple targets within a project.  I'm not either - perhaps you could explain.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

jacksmith

I'm new in codeblocks. I've installed codeblocks-17.12mingw but there's a problem when I open codeblock it shows a error bellow

Environment error

Can't find compiler executable in your configured search path's  for Microsoft Visual C++ Toolkit 2003.   
Please see the attachment.
Thanks

Note: I'm using windows 10 64 bit

BlueHazzard

Try to go Settings->Compiler->Select "GNU gcc" from the drop down menu -> Then press "set as default" button.
Close the dialog with OK
Close codeblocks and restart it
Open codeblocks and try to create a new project.

If the error is still there: What installation program did you use?

jacksmith

Quote from: BlueHazzard on October 07, 2019, 08:25:40 PM
Try to go Settings->Compiler->Select "GNU gcc" from the drop down menu -> Then press "set as default" button.
Close the dialog with OK
Close codeblocks and restart it
Open codeblocks and try to create a new project.

If the error is still there: What installation program did you use?

The problem is solved  :D
Thanks