Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Building CodeBlocks source
stahta01:
I just looked over http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#Compile_Code::Blocks
And, it is out of date.
I will try to give you the basic info needed. Feel free to update the Wiki page.
I will add notes to this post as I go over what I do to build CB.
Please read Wiki Pages linked below
http://wiki.codeblocks.org/index.php?title=Global_compiler_variables
You Need to correct the Global Variable called "cb_release_type"; something MUST be entered in the base field.
I use "-g" without the quotes.
Attached image; please download image and tell me you got it.
Your copy should say default where mine says test_cb_build.
I need to delete the image as soon as possible because this sites has very little space for images.
The warning shown below can be ignore the first time you build CB; it should not happen after the pre-compiled header is created during the SDK build.
--- Code: ---cc1plus.exe: warning: .objs\include: No such file or directory [enabled by default]
--- End code ---
Tim S.
sorinev:
I downloaded the image, thanks.
sorinev:
I've now gotten as far as actually being able to build something this time. I set the cb_release_type (first to -g, then to -O2). I made a cb variable and set it to c:\cb_svn. I'm assuming that's what's meant by root folder. Or should it be c:\cb_svn\src? (well technically it's CodeBlocksSVNSource and not cb_svn).
I did not get the above warning. My build messages are the following:
--- Code: ---||=== Build: tinyXML in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: AutoRevision in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: ConsoleRunner in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: Squirrel std lib in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: SqPlus in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: scintilla in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: wxpropgrid in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
||=== Build: sdk in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler) ===|
C:\CodeBlocksSVNSource\src\sdk\globals.cpp||In function 'void PlaceWindow(wxTopLevelWindow*, cbPlaceDialogMode, bool)':|
C:\CodeBlocksSVNSource\src\sdk\globals.cpp|1050|warning: 'r.tagRECT::bottom' may be used uninitialized in this function [-Wuninitialized]|
C:\CodeBlocksSVNSource\src\sdk\globals.cpp|1050|warning: 'r.tagRECT::right' may be used uninitialized in this function [-Wuninitialized]|
||Execution of 'zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc' in 'C:\CodeBlocksSVNSource\src' failed.|
--- End code ---
and my build log is this:
--- Code: ---...
tons and tons of stuff
...
Creating library file: devel\libcodeblocks.a
Output file is devel\codeblocks.dll with size 7.57 MB
Running target post-build steps
cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks
zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc
Execution of 'zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc' in 'C:\CodeBlocksSVNSource\src' failed.
--- End code ---
The contents of src\output are:
share folder, with various subfolders and files
cb_console_runner.exe
codeblocks.dll
wxmsw28u_gcc_custom.dll
wxpropgrid.dll
And the contents of src\devel are:
share folder, with various subfolders and files
cb_console_runner.exe
cb_share_config.exe
codeblocks.dll
libcodeblocks.a
libwxpropgrid.a
libwxscintilla_cb.a
wxmsw28u_gcc_custom.dll
wxpropgrid.dll
Clearly, I'm missing a few things. I ran update.bat anyway, but it didn't do anything, since I think I need to set up the whole zip windows path variable thing (I need info on that).
Jenna:
The error about the call to zip that failed means you did not follow the steps exactly.
You need a compatible zip in your systems-path, see http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe for a place to download it. The svn-client is not necessarily needed for building sources (if you not use svn-sources) and newer tortoise-svn has it included, so there is no longer the need to download it seperately.
sorinev:
I downloaded the zip 2.3.3 linked on that page. I tried settings the environment variable in codeblocks to ZIPCMD with value of C:\zip-2.3.3 and also tried changing ZIPCMD to just zip instead. That didn't work.
I also added C:\zip-2.3.3 to the windows "Path" area under advanced system properties -> environment variables, still no go.
Finally I just edited update.bat to change
--- Code: ---set ZIPCMD=zip
--- End code ---
to
--- Code: ---set ZIPCMD="C:\zip-2.3.3\bin\zip.exe"
--- End code ---
and now I no longer get "zip" not recognized, etc. messages spammed in the console window if I run update.bat myself; it actually does a few things now. But if I try to build codeblocks again, it still gives me the zip error.
If I'm doing something wrong, I'm not kidding when I say I need an idiot's guide. "Right click this, select this, type this exact thing, press ok. Now do this next thing by opening this menu, then..." etc. I've never built such a complicated application before. Everything I've done to date has ranged from single source file compiles, to projects with at most a couple dozen source files, with no extra settings, dependencies, dlls, etc. This whole thing is very new to me, so remember that what you take for granted is currently rocket science to me and akin to playing darts blindfolded and facing the wrong direction. Or like trying to hit a bullet with a smaller bullet while riding a horse, blindfolded. :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version