Subject: Re: [Boost-build] How to make bjam use gcc instead of g++ using custom compiling and linking options
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-06-24 07:38:50
On 06/22/2014 07:21 PM, Edson Eustachio wrote:
> | : <include>include
> : <link>shared
Please remove ":" before <link>shared. The ":" separates parameters - and you want both <include>include and <link>shared to
be part of 'requirements' parameter.
> I've passed thru the boost documentation but I've not found or I'm not able to understand how to do that into my Jamfile. Does anyone have
> some clue of where should I find instructions to setting that?
> This is the output I get when I try to build the lib using the Jamfile described above:
> |$ bjam
> ...found81 targets...
> ...updating3 targets...
> gcc.compile.c bin/gcc-4.4.3/debug/fmChartW.o
> In file includedfrom src/fmChartW.c:7:
> include/fmChartW.h:163: error: expected')' before'hdc'
> include/fmChartW.h:166: error: expected')' before'hdc'
> include/fmChartW.h:175: error: expected')' before'hdc'
> include/fmChartW.h:176: error: expected')' before'hdc'
> src/fmChartW.c:13: error: expected')' before'hdc'
> src/fmChartW.c:300: error: expected')' before'hdc'
> src/fmChartW.c: In function 'fmChartScreenInit':
> src/fmChartW.c:323: warning: implicit declaration offunction 'malloc'
> src/fmChartW.c:323: warning: incompatibleimplicit declaration of built-in function 'malloc'
> src/fmChartW.c:329: warning: implicit declaration offunction 'free'
> src/fmChartW.c:329: warning: incompatibleimplicit declaration of built-in function 'free'
> src/fmChartW.c: In function 'fmChartScreenClose':
> src/fmChartW.c:350: warning: incompatibleimplicit declaration of built-in function 'free'
> src/fmChartW.c: At top level:
> src/fmChartW.c:396: error: expected')' before'hdc'
> src/fmChartW.c:604: error: expected')' before'hdc'|
> "g++" -x c -O0 -fno-inline -Wall -g -fPIC -I"include" -c -o "bin/gcc-4.4.3/debug/fmChartW.o" "src/fmChartW.c"
So, you're not using gcc, you're using g++, but it should not matter, since "-x c" changes the input language to C. You
also have -fPIC there already. To add -w you can use
in the requirements parameter to the "lib" function.
The errors you get do not appear related to complication options at all - but rather by something else in your sources.
Did you try looking at the source to determine what's up? Warnings like 'implicit declaration of malloc' are also
risky, and unrelated to build tool - probably somethign needs fixing in the source code.
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