View topic - Including external library into QNX Momentics

Page 1 of 1

Including external library into QNX Momentics

PostPosted: Mon Sep 28, 2015 7:25 am
by ClaudeHasler
Hello, I'm having trouble including an external library into my project. I have the .cpp and .h files. No .lib or .a files. How do I go about including these into my project?


Cheers

Claude Hasler

Re: Including external library into QNX Momentics

PostPosted: Mon Sep 28, 2015 4:53 pm
by Tim
Since you only have the source files (.cpp, .h) you'll need to compile those into a library (.so, .a).

You have 2 choices:
1) Create a standalone project in Eclipse that compiles the source files into a library. Then in your project add that library to your link list (and headers to your include list) so you can link it in your project.
2) Add all the source files into your project and create one monolithic project.

Personally I'd go with #1 but it's your choice. If you go with option 1 and the library came with a Makefile (likely) then you can just create a standard Makefile project in Eclipse and point to that Makefile and that should be all you need to get it compiling.

Tim

Re: Including external library into QNX Momentics

PostPosted: Fri Oct 02, 2015 8:06 am
by ClaudeHasler
Thanks, this worked