Skip to content
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

Building demo not succeed #36

Open
wanghaEMQ opened this issue Apr 11, 2022 · 0 comments
Open

Building demo not succeed #36

wanghaEMQ opened this issue Apr 11, 2022 · 0 comments

Comments

@wanghaEMQ
Copy link
Member

When I built the project, an error happened.

I first build the nanosdk, and install it in my system.
Then build the demo mqtt.

Here is log from ninja

➜  build git:(main) ✗ ninja 
[1/2] Building C object CMakeFiles/mqtt_client.dir/mqtt_client.c.o
../mqtt_client.c: In function ‘intHandler’:
../mqtt_client.c:58:2: warning: implicit declaration of function ‘nng_closeall’; did you mean ‘nng_close’? [-Wimplicit-function-declaration]
   58 |  nng_closeall();
      |  ^~~~~~~~~~~~
      |  nng_close
[2/2] Linking C executable mqtt_client
FAILED: mqtt_client 
: && /usr/bin/cc   -rdynamic CMakeFiles/mqtt_client.dir/mqtt_client.c.o  -o mqtt_client  -lnng  -lpthread && :
/usr/bin/ld: CMakeFiles/mqtt_client.dir/mqtt_client.c.o: in function `client_connect':
mqtt_client.c:(.text+0x221): undefined reference to `nng_mqtt_client_open'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
➜  build git:(main) ✗ pwd
/home/wangha/docu/git/NanoSDK/demo/mqtt/build

My Env. Ubuntu 20.04 x86_64

@JaylinYu JaylinYu changed the title Error in building Building demo not succeed Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant