Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>A while ago on Snow Leopard I used the following configuration settings to build wxWidgets for OSX:</p> <p><code>../configure --with-cocoa --with-macosx-version-min=10.6 --enable-unicode --disable-shared --enable-debug --enable-universal-binaries</code></p> <p>The important options are <code>--with-cocoa</code>and <code>--enable-universal-binaries</code> to make it work under 64bit OSX.</p> <p>After this just do <code>make</code> to compile wxWidgets again.</p> <p>Be aware there could be an older version of wxWidgets in <code>/opt/bin/</code>. Because of new wxWidget upgrades I prefer to put the compiled version of wxWidgets in my home folder to keep an eye on all files. If you install it in your system paths you might lose the overview. Now it could happen you're not using the wx-config version you wanted to use.</p> <p>To compile your own wxWidget apps I recommend to create your own Makefile. Your compiling command looks already good, but let me give you an advice. After <code>--libs</code> try using flags like <code>core</code> and <code>base</code> to keep save all OSX Frameworks will be added to your compilation.</p> <p>Here a simple Makefile example you can use if you want to. It also creates an OSX executable.</p> <pre><code>APP = $(shell basename $(shell pwd)) CC = g++ CFLAGS = -Wall `wx-config --cppflags` LFLAGS = `wx-config --libs core,base` BUIDIR = build OBJDIR = obj OSXDIR = osx SRCDIR = src SOURCES := $(wildcard $(SRCDIR)/*.cpp) OBJECTS := $(patsubst $(SRCDIR)/%,%,$(patsubst %.cpp,%.o,$(SOURCES))) NO_COLOR = \033[0m O1_COLOR = \033[0;01m O2_COLOR = \033[32;01m PREFIX = "$(O2_COLOR)==&gt;$(O1_COLOR)" SUFFIX = "$(NO_COLOR)" all: clean linking osx @echo $(PREFIX) Build finished $(SUFFIX) clean: @echo $(PREFIX) Cleaning up $(SUFFIX) rm -rfv $(BUIDIR) $(OBJDIR) $(BUIDIR)/: mkdir -p $@ $(OBJDIR)/: mkdir -p $@ %.o: $(SRCDIR)/%.cpp @echo $(PREFIX) Compiling $&lt; $(SUFFIX) $(CC) $(CFLAGS) -c $&lt; -o $(OBJDIR)/$@ linking: $(BUIDIR)/ $(OBJDIR)/ $(OBJECTS) @echo $(PREFIX) Linking $(SUFFIX) $(CC) $(CFLAGS) $(OBJDIR)/*.o -o $(BUIDIR)/$(APP) $(LFLAGS) osx: $(BUIDIR)/$(APP) $(OSXDIR)/Info.plist @echo $(PREFIX) Creating Mac OS X executable file $(SUFFIX) -mkdir $(BUIDIR)/$(APP).app -mkdir $(BUIDIR)/$(APP).app/Contents -mkdir $(BUIDIR)/$(APP).app/Contents/MacOS -mkdir $(BUIDIR)/$(APP).app/Contents/Resources -mkdir $(BUIDIR)/$(APP).app/Contents/Resources/English.lproj cp $(OSXDIR)/Info.plist $(BUIDIR)/$(APP).app/Contents/ @#cp $(OSXDIR)/version.plist $(APP).app/Contents/ @#cp $(OSXDIR)/InfoPlist.strings $(APP).app/Contents/Resources/English.lproj/ @#cp $(OSXDIR)/Icons.icns AnotherResource.txt $(APP).app/Contents/Resources/ cp $(BUIDIR)/$(APP) $(BUIDIR)/$(APP).app/Contents/MacOS/$(APP) echo -n 'APPL????' &gt; $(BUIDIR)/$(APP).app/Contents/PkgInfo .PHONY: all clean linking osx .SILENT: $(BUIDIR)/ $(OBJDIR)/ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload