Hello all,
I have searched high and low for this, but I can't seem to find it anywhere:
Is there any way to save your project as a standalone file from within Codeblocks, so that it can be run without needing to use Codeblocks?
What i mean is an export to .exe function or something like that. If it's obvious, i apologise, cos i really can't fnd it!
Thanks very much
Jonathan
Your question is vague to me; two answers based on two different reading of question.
I know of no plugin for Code::Blocks needed to create an installer.
There is an export to makefile plugin by a third party for building project via a makefile.
Tim S
If I understood Jonathan well, he is asking about a possibility to compile a project as a huge (3-4MB) exe file, not an 80k executable that will not work on another machine without installed wxWidgets dlls. At least this is what I am trying to check and it looks like this is impossible with CodeBlocks. I could do it easily with wxDev-C++, but this seems to be their only advantage.
I didn't even know you could compile it as a small executable! I'm entirely new to this! How would one go about that, because that sounds entirely sufficient for my needs. Thank you for your replies so far!
If you are using wxWidgets there are 2 options - either to compile to something around 80k and keep a couple of libraries like "wxmsw28_gcc.dll" reachable through the PATH environment variable (in total ~10MB) or have a 4MB exe file including all it needs to run. I would prefer the second option, but don't know how to set it up. In wxDev-C++ it is very easy, probably I'll have to compare two makefiles and find the difference.
It looks like in wxDev-C++ your application is link to static wx library, that's why you don't need the wx.dll.
You can achieve the same thing with C::B, but I don't know how (maybe you need to find wx static lib and link against it)
Quote from: oBFusCATed on July 23, 2009, 07:09:19 AM
It looks like in wxDev-C++ your application is link to static wx library, that's why you don't need the wx.dll.
You can achieve the same thing with C::B, but I don't know how (maybe you need to find wx static lib and link against it)
IIRC, Try unchecking use DLL in wizard. Tim S.
Well, you need not use wxWidgets at all to get an executable. Luckily :)
All you need to do is make any kind of normal project (for example console program or Win32 program) and hit "compile", it will create a standalone executable in the location that is given in the project's options.
Aha! Fantastic. what's the difference between debug and release?
The size of the executable, and the ability to debug the program. You may want to read a beginner's book of C/C++ programming and consult the MinGW/gcc documentation for those basic concepts.