I tried below "site-config.jam" and it works, ONLY if i commented out the AIX part it does not work, because it is empty.
When i made the implementation of the AIX part like: lib LIBSSL ; it works.
Regards,
Meindert
# Copyright 2002, 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import os : name ;
project site-config ;
if [ os.name ] = "LINUX"
{
lib LIBZLIB : LIBZLIBLIB : <name>z : : <include>/usr/local/include/zlib ;
lib LIBZLIBLIB : : <name>zlib ;
# lib LIBZLIBINCLUDE : : : : <include>/usr/local/include/zlib ;
lib LIBXERCESC : : <name>xerces-c ;
lib LIBMGXERCES : : <name>xerces-c ;
lib LIBXQILLA : : <name>xqilla ;
lib LIBFFI : : <name>ffi ;
lib LIBXML2 : : <name>xml2 : : <include>/usr/include/libxml2 ;
lib LIBNTLM : : <name>ntlm ;
lib LIBLDAP : : <name>ldap ;
lib LIBMOTIF : : <name>Xm ;
lib LIBSSL
: :
<name>ssl
<use>LIBCRYPTO
: :
<library>LIBCRYPTO
;
lib LIBCRYPTO : : <name>crypto ;
lib LIBTDBM : : <name>tdbm ;
lib LIBPTHREAD : : <name>pthread <search>/usr/lib/x86_64-linux-gnu ;
lib LIBFLOWCPP : LIBSSL : <name>flowchpp <search>/e/bpmone/ed/sdk/lib : : <include>/e/bpmone/ed/sdk/include ;
} else
if [ os.name ] = "NT"
{
lib LIBZLIB : : <name>libzlib <search>C:/ZLib/Lib/Vc80 ;
lib LIBXERCESC : : <name>xerces-c_3 <search>C:/BPMExtern/xerces-c/VC80/lib ;
lib LIBMGXERCES : : <name>mgxerces <search>C:/BPMExtern/xerces-c/magicVCxx/lib ;
lib LIBXQILLA : : <name>xqilla22 <search>C:/BPMExtern/XQilla/VC80/lib ;
lib LIBFFI
: :
<use>LIBFFI_DLL <use>LIBGCC
<name>libffi <search>C:/BPMExtern/libffi/mingw/lib
: :
<library>LIBFFI_DLL <library>LIBGCC
;
lib LIBFFI_DLL : : <name>libffi.dll <search>C:/BPMExtern/libffi/mingw/lib ;
lib LIBGCC : : <name>libgcc <search>C:/BPMExtern/libntlm/mingw/lib ;
lib LIBXML2 : : <name>libxml2_a <search>C:/LibXML2/Vc80/libMD ;
lib LIBNTLM : : <name>libntlm <search>C:/BPMExtern/libntlm/mingw/lib ;
lib LIBNTLM_DLL : : <name>libntlm.dll <search>C:/BPMExtern/libntlm/mingw/lib ;
lib LIBLDAP : : <name>wldap32 <search>c:/windows/system32 ;
lib LIBSSL : :
<use>LIBEAY32
<name>ssleay32 <search>C:/OpenSSL/libMT
: :
<library>LIBEAY32
;
lib LIBEAY32 : : <name>libeay32 <search>C:/OpenSSL/libMT ;
lib LIBWS32 : : <name>ws2_32 ;
lib LIBTDBM : : <name>libtdbm <search>c:/BPMExtern/tdbm : : <include>c:/BPMExtern/tdbm ;
} # else
#if [ os.name ] = "AIX"
#{}
Hi Meindert,
Am Mittwoch, 14. September 2011, 13:20:36 schrieb Meindert Oldenburger:
> Suggestion: consider making different site-config files for each target-os.Generally, that is an option, but not for me, as I
a) need a solution that works for corss-compiling too, and
b) I want to rely as little as possible on system-wide configurations
btw:
The work-around in my previous post is broken: It doesn't work either.
I came up with another solution which is, to my opinion, as obvious and
elegant as my original one, but a bit longer.
I defined two target alternatives, one for each target-os:
explicit libGL ;
lib libGL
:
: <name>GL
<target-os>linux
;
lib libGL
:
: <name>opengl32
<target-os>windows
;
explicit libGLU ;
lib libGLU<target-os>linux
: libGL
: <name>GLU
;
lib libGLU
: libGL
: <name>glu32
<target-os>windows
;
Note the "explicit" lines. Without them boost-build complains that there is no
best alternative for the targets. (Don't kown why)
Yet, I still think the problem in my previous post is a bug.
Greetings,
Moritz
--
>
> 2011/9/14 Moritz Hassert <mhassert@abm.de>
>
> > Hi all,
> >
> > I'm facing a problem with external/searched libraries and conditional
> > properties, which I think is a bug. I'm using newest boost-build from svn
> > trunk.
> >
> > I have a project with opengl on linux. So I need to link my binary
> > against libGL.so and libGLU.so on linux. I defined two lib targets and
> > used them in my
> > exe target:
> >
> > lib libGL : : <name>GL ;
> > lib libGLU : libGL : <name>GLU ;
> > exe foo : libGL libGLU ...
> >
> > Now I want to build the project on windows too, where the dlls are called
> > opengl32.dll and glu32.dll. My straight-forward approach was to make the
> > <name> property conditional on <target-os> :
> >
> > lib libGL : :
> > <target-os>linux:<name>GL
> > <target-os>windows:<name>opengl32 ;
> >
> > lib libGLU : libGL :
> > <target-os>linux:<name>GLU
> > <target-os>windows:<name>glu32 ;
> >
> > exe foo : libGL libGLU ...
> >
> > However, this results in an error:
> >
> > [...]/boost-build/kernel/class.jam:88: in new
> > *** argument error
> > * rule object(searched-lib-target)@667.__init__ ( name : project : shared
> > ?
> >
> > search * : action )
> > * called with: ( GL libGL : object(project-target)@112 : true : :
> > object(null-action)@666 : : : : )
> > * extra argument libGL
> > [...]/boost-build/tools/builtin.jam:406:see definition of rule '__init__'
> > being
> > called
> > [...]/boost-build/tools/builtin.jam:574: in searched-lib-generator.run
> > [...]/boost-build/tools/unix.jam:113: in object(unix-searched-lib-
> > generator)@24.run
> > [...]/boost-build/build/generators.jam:1004: in try-one-generator-really
> > [...]/boost-build/build/generators.jam:1066: in try-one-generator
> > [...]/boost-build/build/generators.jam:1282: in construct-really
> > [...]/boost-build/build/generators.jam:1366: in generators.construct
> > [...]/boost-build/tools/builtin.jam:477: in object(lib-generator)@5.run
> > [...]/boost-build/build/generators.jam:1004: in try-one-generator-really
> > [...]/boost-build/build/generators.jam:1066: in try-one-generator
> > [...]/boost-build/build/generators.jam:1282: in construct-really
> > [...]/boost-build/build/generators.jam:1366: in generators.construct
> > [...]/boost-build/build/targets.jam:1495: in construct
> > [...]/boost-build/build/targets.jam:1297: in
> > object(typed-target)@116.generate
> > [...]/boost-build/build/targets.jam:732: in generate-really
> > [...]/boost-build/build/targets.jam:704: in
> > object(main-target)@653.generate
> > [...]/boost-build/build/targets.jam:258: in object(project-
> > target)@112.generate
> > [...]/boost-build/build-system.jam:736: in load
> > [...]/boost-build/kernel/modules.jam:283: in import
> > [...]/boost-build/kernel/bootstrap.jam:142: in boost-build
> > [...]/boost-build/boost-build.jam:8: in module scope
> >
> > It seems like both the value of <name> and the lib target name are used.
> > Perhaps the piece of code, that uses the target name as default when no
> > <name>
> > is given gets somehow confused by the conditional property.
> >
> > As a workaround I now use this:
> >
> > lib libGLLinux : : <name>GL ;
> > lib libGLWindows : : <name>opengl32 ;
> >
> > alias libGL : :
> > <target-os>linux:<library>libGLLinux
> > <target-os>windows:<library>libGLWindows ;
> >
> > lib libGLU
> >
> > : libGL # depends on libGL
> > : <target-os>linux:<name>GLU
> > :
> > <target-os>windows:<name>glu32 ;
> >
> > Suprisingly, I get no error for libGLU. But if I remove the dependency on
> > libGL, I get the above error for libGLU target, too.
> >
> >
> > Could someone please tell me whether I'm doing something wrong here or
> > confirm
> > this is a bug? In the latter case I will file an separate bug report.
> >
> > Thanks,
> > Moritz
> >
> > --
> > --
> > AB+M GmbH
> > Haid-und-Neu-Straße 7
> > 76131 Karlsruhe
> > Telefon: (0721) 66488-0
> > Telefax: (0721) 66488-18
> >
> >
> > Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
> > Amtsgericht Mannheim HRB 105845
> >
> > Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
> > Amtsgericht Mannheim HRB 105845
> > _______________________________________________
> > Unsubscribe & other changes:
> > http://lists.boost.org/mailman/listinfo.cgi/boost-build
--
AB+M GmbH
Haid-und-Neu-Straße 7
76131 Karlsruhe
Telefon: (0721) 66488-0
Telefax: (0721) 66488-18
Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
Amtsgericht Mannheim HRB 105845
Geschaeftsfuehrer: Dipl.-Inform. Christopher Asp
Amtsgericht Mannheim HRB 105845
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build