U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » Mac OS » How can I do with theide use -framework ApplicationServices in mac osx
How can I do with theide use -framework ApplicationServices in mac osx [message #45781] Mon, 04 January 2016 02:29 Go to next message
charlie is currently offline  charlie
Messages: 2
Registered: September 2015
Junior Member
In My code :

#include <ApplicationServices/ApplicationServices.h>
....

and link like this:

clang -o xxx xxx.o -framework ApplicationServices

Tell me please, How can I do with theide .
How can I fill in the "Build Methods" form. Thanks.


Makefile:

BIN = keystrokes

SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
CC=clang
LD=clang

CFLAGS += -pedantic -Weverything
LIBS += -framework ApplicationServices

all: $(BIN)

$(BIN): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
rm -f $(BIN) $(OBJS)
  • Attachment: keystrokes.c
    (Size: 2.80KB, Downloaded 560 times)
Re: How can I do with theide use -framework ApplicationServices in mac osx [message #45788 is a reply to message #45781] Mon, 04 January 2016 21:15 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Charlie,

You would just add the CFLAGS (i.e. -pedantic -Weverything) to "Common C++ options" and LIBS (i.e. -framework ApplicationServices) to "Common link options".

But I believe that what you really want with the -framework option, is to actually add it only to package which uses it. If you added it to build method, then it'll be used in all your projects, compiled with that method.

If you only need this for certain package, go to Project > Package organizer, select package which requires this framework and from the menu (right click to the pane on the right side) select "New link options". You'll get a dialog where you can fill the "When" clause and second field where you can fill the linker options. The When clause can be used to specify that the option should be used only when building with certain flag or combination of flags (leave it empty if it should be used always).

To see if your options have been applied as intended, you can check the "Be verbose" checkbox in Setup menu.

Best regards,
Honza
Previous Topic: if you want to build theide 8227 for X11 on Mavericks - works now!
Next Topic: Status of MAC porting
Goto Forum:
  


Current Time: Sat Apr 25 05:00:44 GMT+2 2026

Total time taken to generate the page: 0.00400 seconds