[Qt-interest] qmake using PKGCONFIG on mac OS

Samuel Gaist samuel.gaist at edeltech.ch
Thu Oct 21 16:48:34 CEST 2010


On 21 oct. 10, at 16:21, Paulo Silva wrote:

> Well thanks for your idea.
> I tried that. Added to the environment vars, checked if it was  
> there, and from the same shell started Qt Creator.
> In the same project I cleaned it, run qmake and rebuilt.  
> Unfortunately nothing changed.
>
> So the problem is probably in the qmake run. How can I get more  
> details of what qmake is doing? To try to see what happens when it  
> runs the pkg-config?
>
> Thanks,
> Paulo
>
> Basically when the
>
> On Thu, Oct 21, 2010 at 8:53 PM, Samuel Gaist <samuel.gaist at edeltech.ch 
> > wrote:
>
> On 21 oct. 10, at 13:47, Paulo Silva wrote:
>
> > I installed opencv from macport but it was added to the pkg-config
> > correctly, otherwise it wouldn't work in the terminal right?
> >
> >
> > On Thu, Oct 21, 2010 at 7:36 PM, Samuel Gaist <samuel.gaist at edeltech.ch
> > > wrote:
> > Sorry, I replied in private...
> > On 21 oct. 10, at 11:56, Paulo Silva wrote:
> >
> > > Hi,
> > >
> > > I was trying to compile projected that I created on my GNU/Linux  
> box
> > > on my mac box.
> > > I was hopping that pkg-config would also work on mac so I kept the
> > > line:
> > > PKGCONFIG += opencv
> > >
> > > in my .pro file.
> > > Unfortunately while building the build command is not populated  
> with
> > > the pkg-config output, like include path and libs.
> > > However if I run pkg-config opencv --cflags --libs on the command
> > > line, I do get the expected output.
> > >
> > > Am I doing something wrong here? I'm using qtsdk based on qt 4.7
> > > with qt-creator rev b06f25f265, that I downloaded this week from  
> qt
> > > site.
> > >
> > > Thank you.
> > > Paulo
> > > _______________________________________________
> > > Qt-interest mailing list
> > > Qt-interest at trolltech.com
> > > http://lists.trolltech.com/mailman/listinfo/qt-interest
> > Hi,
> > Did you installed opencv from macport ?
> > If so you should update PKG_CONFIG_PATH to also go look in macport
> > pkconfig directories
> >
> > Hope this helps
> > Samuel
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> Hi again, don't make the same mistake as me, keep the conversation on
> the list, other could help or benefit.
>
> Settings you have on your terminal doesn't always reflect on the rest
> of your system, i have had that problem once, and starting creator
> from the command line (using open foo.pro), it found everything.
>
> Since then i have updated PKG_CONFIG_PATH in my .profile (don't forget
> to log out and in again after that) and i didn't encounter the problem
> anymore
>
> Hope this helps
> Samuel
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
You're welcome,
One other point, did you also checked that the PKG_CONFIG_PATH is  
listed with the correct paths in the Build Environment in the Projects  
pane under Build Settings ?

As for qmake, you can make it more verbose using the -d option.

Samuel



More information about the Qt-interest-old mailing list