LiamBindle / MQTT-C

A portable MQTT C client for embedded systems and PCs alike.
https://liambindle.ca/MQTT-C
MIT License
774 stars 275 forks source link

Need help compile in Windows 10 #69

Closed kusumy closed 4 years ago

kusumy commented 4 years ago

I clone this repo on the windows 10 machine. Then i tried to build simple_publisher example using Visual Studio Code (using gcc as compiler), but there are an error messagea:

fatal error: mqtt.h: No such file or directory

and others ....

Need help, please ...

LiamBindle commented 4 years ago

Hi @kusumy. The problem is that the include/ subdirectory of MQTT-C (which is where mqtt.h is) is included in the list of include directories that your compiler is using. I'm not familiar with gcc+VSCode, but the gcc flag for include directories is -I. I'd recommend looking up how to add include directories to your VSCode project.