Page 1 of 1

Build results in unusual behaviour

Posted: Mon Jun 26, 2006 12:28 am
by AUser

I have started to use wxWidgets, using my macbook pro (intel mac). I have built wxMac-2.6.3 from source (./configure && make && sudo make install), and have successfully built the samples using the provided makefile.

However when attempting to compile the sample opengl "cube" application using my own makefile the application builds successfully, but fails to allow user interaction (other than resizing using the OS's + - buttons).

The makefile i used is supplied below, can someone explain what is wrong? Is there a better way to build the app (note i dont wish to use XCode, and i do want it to be portable to linux/Xorg).

I have been unable to find a good resource on using the console to build wx applications under mac, the bakefile generated makefiles are really hard to read & understand.

CFLAGS= -g `$(WXCONFIG) --cppflags`
LINKFLAG=`$(WXCONFIG) --libs` `$(WXCONFIG) --libs gl` -framework OpenGL -framework AGL

all: cube

cube: cube.cpp $(OBJECTS)

%.o: %.cpp %.h
$(CC) -c $(CFLAGS) $(DEFINES) -o [email protected] $<

-rm -f *.o
-rm -f $(TARGET)

Posted: Mon Jun 26, 2006 8:15 am
by chris

There are certain resource files and a special application package structure necessary on Mac OS. A default Linux makefile won't work. This post contains a makefile template for compiling apps on Mac OS.

HTH, Chris

Posted: Fri Jul 07, 2006 7:38 am
by AUser
thanks heaps!

i was able to use the makefiles to successfully build my apps under GCC, some modification was required for my purpose, but it was not too hard.