This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157387 - pkg-config and gcc static libraries
Summary: pkg-config and gcc static libraries
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-24 11:05 UTC by progchild
Modified: 2014-04-14 14:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description progchild 2009-01-24 11:05:47 UTC
I have a library which can by used with pkg-config. This library is a static one. This means, that when linking with
this library, the library has to be placed in the command line behind the object file which uses the library.

So this works:
g++ -o program main.cpp `pkg-config --cflags --libs mylib`

This does not (it will give you a linker error):
g++ `pkg-config --cflags --libs mylib` -o program main.cpp

When using a C++-Application project from Netbeans there are only the "Additional Options" for the linker, where I can
place the pkg-config command. But the command is placed before the object file. This does not work for static libraries.

I think there are two ways to solve this problem. The first one is, to allow the user to place additional linker flags
anywhere in the command line call to gcc. The second one is, that the pkg-config command is parsed by Netbeans and the
linker options are set according to the pkg-config call.