How do I link with Aquaterm library for an external build?

Ryan Schmidt ryandesign at macports.org
Wed Jan 30 14:42:12 PST 2013


On Jan 30, 2013, at 15:50, Jerry wrote:

> On Jan 30, 2013, at 3:04 AM, Mojca Miklavec wrote:
> 
>> Please try to add "-F/opt/local/Frameworks" to CFLAGS
>> (CXXFLAGS/ObjCFLAGS/FFLAGS/FCFLAGS) and LDFLAGS in addition to
>> "-framework AquaTerm" and report whether it works. I don't have any
>> good idea how to make this work automatically (apart from introducing
>> pkg-config configuration).
>> 
>> Apple automatically looks into /Library/Frameworks, but not into any
>> other place unless you provide an additional flag.

> Your comment led me to put a symlink from /opt/local/Library/Frameworks/AquaTerm.framework to /Library/Frameworks/AquaTerm.framework. I'm not sure why I didn't think of that earlier but I was confused about the previous symlink in /usr/bin or whatever it was.

Although this is probably not a problem for AquaTerm, because /Library/Frameworks is a default search location, having more popular libraries there can cause them to be opportunistically linked to. Which is why we recommend you don't put anything in /Library/Frameworks (or /usr/local) if you want to use MacPorts.


> I'm not a cmake expert and basically have to have most things that are cmake-related explained to me pretty literally. Since I've fixed the problem with the solution above, this is not terribly important for you to answer, but would you mind showing me more explicitly how to add "-F/opt/local/Frameworks" and "-framework AquaTerm" to CFLAGS? I currently have no CFLAGS variable in my build script. Would I add a line like this?
> 
> CFLAGS=-F/opt/local/Frameworks -framework AquaTerm

If you want those three values to be in CFLAGS, you'll have to enclose them in quotes:

CFLAGS="-F/opt/local/Library/Frameworks -framework AquaTerm"


> Also, would adding /opt/local/Library/Frameworks/ to my PATH variable be useful?

No; PATH is where you define the paths where programs that you run on the command line are to be found; /opt/local/Library/Frameworks doesn't contain programs; it contains frameworks.



More information about the macports-users mailing list