Boost logo

Boost-Build :

From: jjanzer0 (yahoo_at_[hidden])
Date: 2005-05-19 10:35:07


Ok I think I'm almost there now... I just have one more question. I
get an error if lwsock32-name is empty during the call:
lib lwsock32 : : <name>$(lwsock32-name) ;
"
*** argument error
* rule object(linking-generator)@2.run ( project name ? : property-set
: sources + : multiple ? )
* called with: ( Jamfile</home/zeta/code/lanthera/src/client> lwsock32
: object(property-set)@15 : : )
* missing argument sources
"

if i set the condtion that I test for LINUX to any value it compiles
fine, but I'd prefer not to have any value set... like I want lwsock32
to really just be NULL, does that make sense?

--- In jamboost_at_[hidden], "Pedro Ferreira"
<pedro.ferreira_at_m...> wrote:
> > That's sort of what I want but I'd really prefer to have the
> > conditional based on the OS or based on a defined value in a
header
> > file. Is this even possible?
>
> Sure:
>
> local lwsock32-name = ;
> if [ os.name ] = NT
> {
> lwsock32-name = wsock32 ;
> }
> else if [ os.name ] = MACOSX
> {
> lwsock32-name = xpto ;
> }
>
> (...)
>
> lib lwsock32 : : <name>$(lwsock32-name) ;
>
> Pedro
>
>
> > --- In jamboost_at_[hidden], "Pedro Ferreira"
> > <pedro.ferreira_at_m...> wrote:
> >> Hi,
> >>
> >> > Hi I need to include the wsock32 libraries conditionally when
I'm
> >> > building a project on windows (and I don't want to link it in
> > when I'm
> >> > in linux)...
> >> >
> >> > I'm sure this is very trivial but I'm having a very hard time
> > figuring
> >> > out how to actually do it, I have something like the following:
> >> >
> >> > project client
> >> > : requirements <include>../common ;
> >> >
> >> > lib lwsock32 : : <name>wsock32 ;
> >> >
> >> > exe myClient
> >> > : client.cc
> >> > lwsock32
> >> > ;
> >> >
> >> > That works fine, but what I need is to actually include a
> > conditional
> >> > in bjam v2, in order to load it (only in windows)... something
> > like
> >> > <toolset>gcc:<library>lwsock32
> >> > but using some variable instead.
> >> > Any help would be greatly appreciated.
> >>
> >> I'm not really sure if this is what you intend (it's still too
early
> > in the
> >> morning...) but, if you want to include the lib if using msvc and
> > not
> >> include it if gcc, you can do this:
> >>
> >> lib lwsock32 : : <name>wsock32 <toolset>msvc ;
> >>
> >> alias lwsock32 : : <toolset>msvc ;
> >>
> >> exe myClient
> >> : client.cc
> >> lwsock32
> >> ;
> >>
> >> HTH,
> >>
> >> Pedro
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk