how to specify libs under the IDE

Hello,
I have a phab application that I’m comiling where I use the PxConfig()
functions to read ini files. To compile under the Windows Hosted PE I need
to add -l phexlib to the makefile.

Now I thought that I could edit the src/abLfiles and add -l phexlib to the
end of the ABLIB entry, this allows me to compile but after I do a generate
under phab I loose the lib entry.

Can someone tell me the best place to put the makefile options ? I can
always fudge things but its nice to know if there was an intended way of
doing this or not.

TIA, Brett.

Brett Wilton <bdwilton@xtra.co.nz> wrote:

In the on-line helpviewer search for “multiplatform applications” and
this should return a page from the Photon docs called “Generating,
Compiling, and Running Code”, and then click on the “Including non-Phab
files in your application” … which tells you (I’m not telling you
this myself, because I’m not a Phab programmer :wink:

Now I thought that I could edit the src/abLfiles and add -l phexlib to the

The ab* files are auto-generated by Phab, but the ind* files are yours
to hand-edit. There doesn’t appear to be one for libraries, but a little
further down it discusses the LDFLAGS and SDFLAGS variables which you can
use for this purpose. And a little further down again it implies you do
that by hand-editing the Makefile. To quote:

Adding libraries

If your application uses a library that isn’t included by default in the
Makefile, you can add it by editing the following variables:

  • LDFLAGS – used when linking against static Photon libraries.
  • SDFLAGS – used when linking against shared Photon libraries.

For QNX projects in C/C++ projects view open pull down menu, select
Properties/QNC C/C++ project/Linker and in categories select Extra libs.


Alex

“Brett Wilton” <bdwilton@xtra.co.nz> wrote in message
news:bc6c9e$m9c$1@inn.qnx.com

Hello,
I have a phab application that I’m comiling where I use the PxConfig()
functions to read ini files. To compile under the Windows Hosted PE I need
to add -l phexlib to the makefile.

Now I thought that I could edit the src/abLfiles and add -l phexlib to the
end of the ABLIB entry, this allows me to compile but after I do a
generate
under phab I loose the lib entry.

Can someone tell me the best place to put the makefile options ? I can
always fudge things but its nice to know if there was an intended way of
doing this or not.

TIA, Brett.

Thanks for the answers - great