-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building with Platformio - Multiple ways to build #2
Comments
No experience with PlatformIO, but if it is just the name, changing it is probably the best solution. However, the two Files MQTT.h and MQTT.cpp are NOT implementing the broker (this is uMQTTBroker.h and the file in the mqtt-dir). These are just the C++ interface to the client functions. Thus, if you only need the broker, dropping the two files might also be an option. |
Ok! Thanks Martin. |
All you need to interact with the local MQTT broker is in uMQTTBroker.h. The current MQTT.h/cpp are just required when you want to use the "original" functionality of tuanpmt's CLIENT lib (client to a remote broker), that is still included. If you want to check username/password for any client connecting to your local broker, use the callback:
and return true if you are willing to accept this u/p. |
Thanks for the info Martin. |
May I also suggest putting this information on the Readme, for other users who may face the same error on Platformio. |
When building the example program on Platformio, the following error is thrown:
This might be due to the same name (mqtt.c and MQTT.cpp) of the two files being referenced, due to the non-case-sensitive nature of files on Windows. Both mqtt.c and MQTT.cpp would make the same object file, MQTT.o.
Possible solution, change MQTT.cpp (and .h) to MQTT_Broker.cpp? Along with changing the class name and constructor and destructor? Or is that not a good way to deal with this issue?
The text was updated successfully, but these errors were encountered: