Compiling error in C++

I am using download_client library in C++ project. I have to include coap.h but when I compile I get this error:


C:/ncs/v2.7.0/zephyr/include/zephyr/net/coap.h:744:16: error: invalid conversion from 'int' to 'coap_block_size' [-fpermissive]

I can modify my CMakeLists.txt adding the following

target_compile_options(app PRIVATE -fpermissive)
but my question is if exists one way to compile without downgrading c++ checks.
Best Regards
Parents
  • Hi,

    I am using download_client library in C++ project. I have to include coap.h

    Can you show how you do this?

    when I compile I get this error:


    C:/ncs/v2.7.0/zephyr/include/zephyr/net/coap.h:744:16: error: invalid conversion from 'int' to 'coap_block_size' [-fpermissive]

    Can you provide full log which shows the error?

    my question is if exists one way to compile without downgrading c++ checks.

    Can you rephrase this sentence? What do you refer to as "downgrading C++ checks"?

    Which C++ version do you use?

    Best regards,
    Dejan

Reply
  • Hi,

    I am using download_client library in C++ project. I have to include coap.h

    Can you show how you do this?

    when I compile I get this error:


    C:/ncs/v2.7.0/zephyr/include/zephyr/net/coap.h:744:16: error: invalid conversion from 'int' to 'coap_block_size' [-fpermissive]

    Can you provide full log which shows the error?

    my question is if exists one way to compile without downgrading c++ checks.

    Can you rephrase this sentence? What do you refer to as "downgrading C++ checks"?

    Which C++ version do you use?

    Best regards,
    Dejan

Children
Related