Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: johne53 on October 09, 2010, 03:23:11 pm

Title: A library of Code::Blocks projects ?
Post by: johne53 on October 09, 2010, 03:23:11 pm
This only occurred to me this morning but maybe it's been suggested before. It's one of those ideas that's blindingly obvious but somehow, everybody missed it.

Code::Blocks is an open source, cross platform IDE.
There are many open source libraries available today.
There are very few cross platform build environments. For example, make works well with *nix and gcc but doesn't work with VC++. VC projects work well for Windows compilation but can't be used for other platforms. XCode is apparently superb for OS-X development but not for anything else.

Wouldn't there therefore be some merit in maintaining somewhere a downloadable repository of C::B projects for other open source projects?  For example, official C::B projects for libglib, lingtk, libpango, libfftw3, libxml etc, etc. Maintained voluntarily by the C::B development community.This might be pretty useful for boosting Code::Blocks's popularity. Does such a thing exist? Or does anyone else think it's a good idea?
Title: Re: A library of Code::Blocks projects ?
Post by: ollydbg on October 09, 2010, 04:03:22 pm
I have some experience in some libraries.

opencv : it use cmake, so it can generate a cbp project for codeblocks
ode(open dynamic engine), it use "premake" tool to generate cbp project for codeblocks.
Title: Re: A library of Code::Blocks projects ?
Post by: johne53 on October 09, 2010, 08:35:41 pm
I'm involved in a large project with around two dozen sub-projects. It can be built either with gcc or Visual C++. For convenience I maintain two independent Code::Block workspaces but in fact, the differences between them are relatively few. Often they're just to do with debugging. For example, most projects use DEBUG for identifying a debug build - but VC++ builds usually benefit from defining _DEBUG or NDEBUG too (as appropriate). VC++ builds also tend to benefit from defining _MBCS which is rarely needed for any other compiler. And #defined preprocessor strings are handled slightly differently too. The preprocessor directive PACKAGE="libgtk+" usually needs to be sent to gcc like this:-

PACKAGE=\\"libgtk+\\"

and to Visual C++ like this:-

PACKAGE="\"libgtk+\""

Other compilers might be subtly different again but these are fairly minor differences. It might even be possible to adapt C:B itself to make the changes automatically when switching a project from one compiler to another.

The only question is whether the Code::Blocks community is large enough and enthusiastic enough to develop such a repository. Since the 3rd party projects are constantly under development, it would probably work best if any given C::B contributor was focussing on just a small number of them - so the number of contributors would probably need to be quite high. I suppose that might make it difficult.

It would be interesting to know if any C::B users already have a favourite library that they'd be willing to maintain for the benefit of the whole community.
Title: Re: A library of Code::Blocks projects ?
Post by: stahta01 on October 09, 2010, 10:03:28 pm
You might wish to use/see wxdemo on wxcode to build C::B projects.
It is using premake or CMake which can be used to create C::B projects.
I was planning to do it; but, I just do not have the time and energy.

Tim S.