Forget about the DEPENDS, I used that in another scenario.
I tried the following recipe:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "file://main.cpp"
do_compile() {
# For example purpose use only
${CXX} ${CXXFLAGS} ${WORKDIR}/main.cpp -o ${B}/${PN}
}
With a simple main:
#include <iostream>
#include <cstdio>
int main(void) {
printf("Hello from %s\n", __func__);
return 0;
}
And it get built just fine (`bitbake libstdtest`)
Gabriele
On Tue, Dec 3, 2019 at 12:23 PM Mauro Ziliani <[email protected]> wrote:
> I try,
>
> But libstdc++-dev is procudes by gcc-runtime recipe.
>
> I try to put gcc-runtime in DEPENDS e RDEPENDS_${PN} but this doesn't.
>
> Finally I put manually the -I${STAGING_INCDIR}/c++/5.3.0
> -I${STAGING_INCDIR}/c++/5.3.0/${CC_PREFIX}
> in the Makefile.
>
> CC_PREFIX=arm-poky-linux-gnueabi
> Il 03/12/19 11:55, Gabriele Zampieri ha scritto:
>
> Hi,
>
> have you tried adding libstdc++-dev to the recipe dependencies?
>
> DEPENDS += " libstdc++-dev"
>
> This will bring libstdc++ package into recipe sysroot and no extra actions
> will be needed on compilation flags.
>
> Regards,
> Gabriele
>
> On Tue, Dec 3, 2019 at 11:44 AM Mauro Ziliani <[email protected]>
> wrote:
>
>> Hi all
>>
>> I'm trying to compile a library which need cstdio.
>>
>> The file is in ${STAGING_INCDIR}/c++/5.3.0 and in
>> ${STAGING_INCDIR}/c++/5.3.0/tr1
>>
>> I think I need to "include" in my recipe all libstdc++dev package
>>
>> Looking on ${CXX} -v I get
>> --with-gxx-include-dir=/not/exist/usr/include/c++/5.3.0
>>
>>
>> How can I use stdc by recipe?
>>
>>
>> Mauro
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#47516):
>> https://lists.yoctoproject.org/g/yocto/message/47516
>> Mute This Topic: https://lists.yoctoproject.org/mt/65707284/3618237
>> Group Owner: [email protected]
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
>> [email protected]]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#47520): https://lists.yoctoproject.org/g/yocto/message/47520
Mute This Topic: https://lists.yoctoproject.org/mt/65707284/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-