← Back to team overview

kicad-developers team mailing list archive

Re: Tip on compiling PCBNEW svn 701

 

Tim

Most everyone has switched now to using CMake rather than the old makefiles. This is explained in the how-to-build-kicad.txt file.

btw, i had to add:

BOOST_LIB = /usr/include/boost

to pcbnew/makefile.gtk (took me quite a bit to figure out this, as it
left a trailing -I on the g++ command line. (try it yourself!))

I apt-got installed from libboost-dev and libbost-dbg on debian
unstable, which apparently did not set the environment variable
$BOOST_LIB

if we are going to depend on boost, there may be other things i kicad
that can be refactored & made more efficient... or at least for the
future (?) e.g. <vector>



Indeed.


I am using std::vector and boost::ptr_vector in the new specctra code extensively. The ptr_vector is nice for larger objects or where having a copy constructor would be too expensive.

In fact with the new TYPE_COLLECTOR class a person can abstract out the linked list walking we are doing now. Then after that, even some of the linked list code could be converted to use std::vector or boost::ptr_vector because the calling code would be using the TYPE_COLLECTOR. The only change when switching to vector from linked lists is the Visit() function. This gives at least read only access. Inserting objects is also different when switching from a linked list to vector, but even that could be done by transitioning to using the new BOARD::Add() function first, so all client code becomes dependent on that interface first, then vector sneaks in behind it.

Dick








References