C++ library does not export static functions like lib_init()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mosquitto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Version 1.1 (+ earlier) (Windows)
mosquittopp.h missing mosqpp_EXPORT on following static functions
const char *strerror(int mosq_errno);
const char *connack_string(int connack_code);
int sub_topic_
int sub_topic_
int lib_version(int *major, int *minor, int *revision);
int lib_init();
int lib_cleanup();
int topic_matches_
should be
mosqpp_EXPORT const char *strerror(int mosq_errno);
mosqpp_EXPORT const char *connack_string(int connack_code);
mosqpp_EXPORT int sub_topic_
mosqpp_EXPORT int sub_topic_
mosqpp_EXPORT int lib_version(int *major, int *minor, int *revision);
mosqpp_EXPORT int lib_init();
mosqpp_EXPORT int lib_cleanup();
mosqpp_EXPORT int topic_matches_
Can confirm with dumpbin /exports mosquittopp.dll
Work around is to call the mosquitto version e.g.
#ifdef _WIN32 // lib_init() not in windows lib?
mosquitto_
#else
lib_init();
#endif
Though need to link against both mosquittopp and mosquitto
Changed in mosquitto: | |
status: | Fix Committed → Fix Released |
I agree, this is incorrect. I've made a commit that fixes it for 1.1.1:
https:/ /bitbucket. org/oojah/ mosquitto/ commits/ 11ee1ebbb4992d7 a09dbabde456757 61
Thanks for the report!