Vishal Birajdar
Vishal Birajdar

Reputation: 1

wolfmqtt library issue in stm32cube ide

I am added wolfmqtt through software packs and configure it in project.

And I am copying mqttsimple.

mqttsimpl.h file in my CORE -> Inc, CORE -> Src.

if I calling a mqttsimple_test function in main.c which is define in mqttsimple.c.

Showing following error:

ompilation terminated.
make: *** [Core/mqttsimple/subdir.mk:19: Core/mqttsimple/mqttsimple.o] Error 1
make: *** Waiting for unfinished jobs....
../Core/Src/mqttsimple.c:38:10: fatal error: netinet/in.h: No such file or directory
   38 | #include <netinet/in.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Core/Src/subdir.mk:37: Core/Src/mqttsimple.o] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.

I am excluding the mqttsimple folder In middleware ->third party-> wolfmqtt-> example-> mqttsimple.

And copy the mqttsimple.c in core -> src and mqttsimple.h in core->Inc.

I talk to wolfssl team they told me to add (#define HAVE SOCKET) in these header file (wolfSSL.I-CUBE-wolfMQTT_conf.h).

Upvotes: 0

Views: 216

Answers (1)

Eric Blankenhorn
Eric Blankenhorn

Reputation: 141

This is not a wolfMQTT library issue, this is an application issue. The example you are trying to use links against the wolfMQTT library. You are trying to call the example function mqttsimple_test.

You should write your MQTT client application, using the example as a guide. Call the wolfMQTT API directly.

Upvotes: 0

Related Questions