eclipse / paho.mqtt.cpp

Other
988 stars 426 forks source link

Base64TestOpenSSL giving problem and how to use only paho-mqtt3as libraray project in visual studio #477

Open 22samsandhu opened 7 months ago

22samsandhu commented 7 months ago

Firstly I am on Windows and Visual studio 2022

I successfully build paho c library using cmake with providing openssl.

But now when I open the solution in visual studio and set the Base64TestOpenSSL as startup project then it is giving me following error Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) Base64TestOpenSSL C:\Windows\System32\paho.mqtt.c\build\src\MSVCRTD.lib(exe_main.obj) 1

My main motive is to use paho-mqtt3as project in with my visual studio project so when I did this and Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol OPENSSL_init_crypto referenced in function SSLSocket_initialize mqtt_subscriber E:\SAMAN\mqtt_subscriber\mqtt_subscriber\paho-mqtt3as-static.lib(SSLSocket.obj) 1
and many errors like this related to openssl

please can you tell me step by step that how will I use the paho-mqtt3as visual studio project with my another project in visual studio 2 I want to do above and I am getting this error image

please be in mind that I am new to it so give me each step if you can.

fpagliughi commented 1 month ago

If you're just using the Paho C library, it would be better to ask this question on that repository. https://github.com/eclipse/paho.mqtt.c/issues