cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.48k stars 430 forks source link

C++ undefined references? Not linking like it should do. #555

Closed aedn-sama closed 3 years ago

aedn-sama commented 3 years ago

Following errors iam getting:

undefined reference to `mg
undefined reference to `mg_mgr_poll'_bind'
undefined reference to `mg_mgr_init'
undefined reference to `mbuf_remove'

how do i fix this? If i execute this: g++ main.cpp -lmongoose it gives me that: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lmongoose

DrBomb commented 3 years ago

Are you doing a local or a remote build? You don't have to execute g++ at any moment to build a mongoose-os app.

Please read the docs https://mongoose-os.com/docs/mongoose-os/userguide/build.md

aedn-sama commented 3 years ago

Are you doing a local or a remote build? You don't have to execute g++ at any moment to build a mongoose-os app.

Please read the docs https://mongoose-os.com/docs/mongoose-os/userguide/build.md

Iam doing it locally on my pc with visual studio code without any docker.

In their docs states that i just need to place the mongoose.c and mongoose.h in my build directory

DrBomb commented 3 years ago

Looks like this issue is related to "mongoose" the networking library instead of "mongoose-os" which is the IoT development framework. This is the correct repo to fill the issue https://github.com/cesanta/mongoose