Cross compile mqtt c code

im trying to crosscompile an MQTT c code for openwrt router
here is the error i always got

fatal error: MQTTClient.h: No such file or directory
    2 | #include "MQTTClient.h"

i just want to know how to cross compile the code with the library
i've read about editing the makefile but i've found a lot of makefiles and i didnt know which one to edit

You are missing the library that provides MQTTClient.h. Once you've figured out which package provides this library, you can add it as a dependency and link against it.
If there is no package for this library, you will have to add the library as well.

can you specify to me which makefile should i edit (because i found a lot of them )

that is not what he told you to do ...

1 Like

im newbie in openwrt stuf
can you make it clearer to me
i didnt understand exactly what it do
thank you

then that's the question you should be asking.
it's not openwrt related, but compiling in general.

you need to figure out what (package, depending on Linux flavor used) provides MQTTClient.h, and install it.

1 Like

What are you trying to compile? If you can post either the code or a link to the repository, we can have a look.

1 Like

try my repo:

hello again
im trying to cross compile a code that include mqttclient.h
i know that i should add the package as a depends in a make file
should i make a new makefile or edit one and add the package?(if ill edit a file then which makefile is it ?)