Importing libraries via git into netbeans project

Hi,

I’ve just started using netbeans and I am very happy with code completion and all the other things a mature IDE brings. I can successfully build an image and I then use particle-cli to flash OTA. Great.

My question is I would be like to be able to import some or all of the public libraries available through the cloud IDE but I am stuck at how to do this. I first tried to manually copy across Adafruit_ILI9341 and Adafruit_mfGFX into the libraries folder along side Serial2. I updated the makefile to add the two folders to the include list. However, it doesn’t seem to find the required files properly. A sample arm-gcc line:

arm-none-eabi-gcc -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb  -I../applications/TFTDisplay/ -I../inc -I../libraries/Serial2 -I../libraries/Adafruit_ILI9341 -I../libraries/Adafruit_mfGFX -I../../core-common-lib/CMSIS/Include -I../../core-common-lib/CMSIS/Device/ST/STM32F10x/Include -I../../core-common-lib/STM32F10x_StdPeriph_Driver/inc -I../../core-common-lib/STM32_USB-FS-Device_Driver/inc -I../../core-common-lib/CC3000_Host_Driver -I../../core-common-lib/SPARK_Firmware_Driver/inc -I../../core-common-lib/SPARK_Services/inc -I../../core-communication-lib/lib/tropicssl/include -I../../core-communication-lib/src -I. -ffunction-sections -Wall -fmessage-length=0 -Werror=deprecated-declarations -MD -MP -MF obj/applications/TFTDisplay/application.o.d -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -DDFU_BUILD_ENABLE -DSPARK=1 -DRELEASE_BUILD -std=gnu++11 -fno-rtti -fno-exceptions -c -o obj/applications/TFTDisplay/application.o ../applications/TFTDisplay/application.cpp

Where am I going wrong?

I guess there are two parts.

  1. Where to put libraries and how to include them in a project
  2. Pulling the community libraries in over git

Thanks,
Al

Just wondering if putting in the same folder as your application works?

Maybe this is useful: Photon OSX local build setup notes on 20150531

1 Like

Hi - thanks for your reply.

It still does not compile if I move the libraries to with my application folder. However, if I move the include files to …\inc and the source files to …\src it does compile. However, I feel I am missing one step to include and build libraries accordingly, perhaps it is because those libraries are not yet built so there is nothing to link to and no definitions.

I will have another look. Cheers,
Al

@albal,

i placed the library files in my application folder and it worked ok.

KENMBP:lib-test kennethlimcp$ tree
.
├── lib-test.cpp
├── my-lib.cpp
└── my-lib.h

@albal, @kennethlimcp, the #include reference in the IDE code may have incorrect paths due to the IDE library requirements. This would prevent them from correctly compiling in a local environment. :smile: