I am planning on Using C::B to compile KiCAD, which parts are OK to put on C::B's Wiki?
KiCAD is an Electronic Design Automation (EDA) Tool.
http://kicad.sourceforge.net/wiki/index.php/Main_Page
The build system is CMake.
The widget toolkit is wxWidgets.
The normal compiler is GCC with Boost C++ Libraries
The main sub-topics include
How to compile the release and debug builds of wxWidgets Library using Unicode/Monolithic/Shared with openGL.
How to compile the release and debug builds of wxWidgets Library using Unicode/MultiLib/Static with openGL.
How to add Boost C++ Libraries to MinGW GCC Installation
How to use CMake to create an Code::Blocks Makefile project
Which is OK to put on the Code::Blocks Wiki?
Tim S
It would be great if you would also provide a CodeBlocks (cbp) project file.
I think the development document is the best place to put this wiki page.
Working on finding info on the right way to build Boost C++ for Windows;
Links I am collecting with info.
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html#bboost
Looks like the right way requires ICU to already be built.
International Components for Unicode (ICU) http://site.icu-project.org.
Tim S
Quote from: stahta01 on March 04, 2009, 06:17:22 AM
Working on finding info on the right way to build Boost C++ for Windows;
Links I am collecting with info.
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html#bboost
This page doesn't cover Mingw compiler under windows. :(
Quote from: ollydbg on March 04, 2009, 06:32:45 AM
This page doesn't cover Mingw compiler under windows. :(
No where,that I can find, for the last two version, is MinGW GCC covered using Boost C++.
Tim S
PS: I am looking at several weeks of work on this.
Quote from: stahta01 on March 04, 2009, 07:06:31 AM
No where,that I can find, for the last two version, is MinGW GCC covered using Boost C++.
I am using boost with MinGW just fine (if that is the question). Meaning: I am compiling boost using MinGW and using boost libs in projects based on MinGW.
I have no problem using boost on windows with mingw either. Just follow the Boost Getting Started on Windows
http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html (http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html), section 5.2: Build from source.
It uses bjam to build, but this works out of the box, also for mingw
Cheers, Theo.
Quote from: MortenMacFly on March 04, 2009, 09:21:38 AM
I am using boost with MinGW just fine (if that is the question). Meaning: I am compiling boost using MinGW and using boost libs in projects based on MinGW.
Here's the basic bjam command, I am trying out.
bjam threading=multi variant=release link=shared toolset=gcc --prefix="C:\Apps\MinGW_Boost" -without-mpi install
I am doing both "variant=release" and "variant=debug"; I am also trying several other -without-LIBNAME to see which Libs are required for KiCAD.
Morten, any suggestions of other options to try, or avoid, with bjam?
Tim S
Quote from: stahta01 on March 05, 2009, 05:38:59 AM
bjam threading=multi variant=release link=shared toolset=gcc --prefix="C:\Apps\MinGW_Boost" -without-mpi install
Morten, any suggestions of other options to try, or avoid, with bjam?
Besides
-without-mpi this is pretty much what I am using for the build, too (there was a "
stage" keyword, too somehow but I don't recall if that was important). Hence I don't know what KiCAD requires (I don't even know what KiCAD is btw...)
See http://wiki.codeblocks.org/index.php?title=KiCadBuildQuickRef
A work in progress
I am starting testing the best way to Build KiCAD using Code::Blocks.
My Directions will be based on these links
http://manveru.pl/node/3
http://kicad.svn.sourceforge.net/viewvc/kicad/trunk/kicad/COMPILING.txt?view=markup
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html#bboost
http://wiki.codeblocks.org/index.php?title=Using_Boost
http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef
--== How to build kicad using CMAKE generated CB Makefiles ==--
First Written: 05-Mar-2009
Last Revised: 06-Mar-2009
Kicad needs wxWidgets, the multi platform G.U.I.
Perform these steps in sequence.
Windows ONLY Directions; will try to add Linux Version in future
A. MinGW GCC Compiler steps
A-1) install "mingw".
A-2) Install zlib.
A-3) Install Boost C++ Template Libraries (*.hpp files)
B. wxWidgets Steps
B-1) Install wxWidgets.
B-2) Build wxWidgets.
C. kicad build using CMake and Code::Blocks Steps
C-1) Install the kicad source tree.
C-2) Install CMAKE
C-3) Install "Code::Blocks"
C-4) Use cmake to build the kicad makefiles.
C-5) Use Code::Blocks to build kicad.
Tim S
Patch Needed to KiCad SVN Source for Monolithic Build to work; updated patch should not break MultiLib
Index: kicad/CMakeLists.txt
Index: kicad/CMakeLists.txt
===================================================================
--- kicad/CMakeLists.txt (revision 1641)
+++ kicad/CMakeLists.txt (working copy)
@@ -118,6 +118,11 @@
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+IF(wxWidgets_FOUND)
+#
+ELSE(wxWidgets_FOUND)
+ find_package(wxWidgets COMPONENTS mono gl QUIET)
+ENDIF(wxWidgets_FOUND)
check_find_package_result(wxWidgets_FOUND "wxWidgets")
C-4) Use cmake to build the kicad makefiles. (My Paths Shown Below; will change in real directions)
CD C:\SourceCode\Projects\EDA\KiCad\kicad-svn\kicad
mkdir build
mkdir build\release
mkdir build\debug
CD build\release
cmake -G "CodeBlocks - MinGW Makefiles" -DZLIB_INCLUDE_DIR=C:/Apps/MinGW_Boost/include -DCMAKE_BUILD_TYPE=Release -DBoost_INCLUDE_DIR=C:/Apps/MinGW_Boost/include/boost-1_38 -DwxWidgets_ROOT_DIR=C:/SourceCode/Projects/wxWidgets/wxWidgets-2.8.x-MonoLib -DwxWidgets_LIB_DIR=C:/SourceCode/Projects/wxWidgets/wxWidgets-2.8.x-MonoLib/lib/gcc_dll -DwxWidgets_CONFIGURATION=mswu -DSubversion_SVN_EXECUTABLE="C:/Program Files (x86)/CollabNet Subversion/svn.exe" ../..
New Patch for KiCad; waiting on feedback from KiCAd Devs whether MonoLib or MultiLib is proper build type.
Index: kicad/CMakeLists.txt
===================================================================
--- kicad/CMakeLists.txt (revision 1641)
+++ kicad/CMakeLists.txt (working copy)
@@ -18,6 +18,7 @@
option(KICAD_CYRILLIC "enable/disable building unicode (default OFF)")
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(KICAD_GOST "enable/disable building unicode (default OFF)")
+option(wxWIDGETS_USE_MULTILIBS "enable/disable building Multiple Library wxWidgets (default ON)" ON)
# Comment this out if you don't want to build with Python support.
# OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)")
@@ -117,7 +118,11 @@
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
-find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+if(wxWIDGETS_USE_MULTILIBS)
+ find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+else(wxWIDGETS_USE_MULTILIBS)
+ find_package(wxWidgets COMPONENTS mono gl QUIET)
+endif(wxWIDGETS_USE_MULTILIBS)
check_find_package_result(wxWidgets_FOUND "wxWidgets")