Skip navigation.
Home
The QNX Community Portal

View topic - Including external library into QNX Momentics

Including external library into QNX Momentics

anything that doesn't fit to other groups.

Including external library into QNX Momentics

Postby ClaudeHasler » Mon Sep 28, 2015 7:25 am

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
ClaudeHasler
Active Member
 
Posts: 10
Joined: Thu Sep 24, 2015 7:18 am

Re: Including external library into QNX Momentics

Postby Tim » Mon Sep 28, 2015 4:53 pm

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
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: Including external library into QNX Momentics

Postby ClaudeHasler » Fri Oct 02, 2015 8:06 am

Thanks, this worked
ClaudeHasler
Active Member
 
Posts: 10
Joined: Thu Sep 24, 2015 7:18 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 4 guests