Build results in unusual behaviour
Posted: Mon Jun 26, 2006 12:28 am
Hello,
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.
Thanks
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.
Thanks
[/quote]CC=g++
WXCONFIG=/usr/local/bin/wx-config
CFLAGS= -g `$(WXCONFIG) --cppflags`
LINKFLAG=`$(WXCONFIG) --libs` `$(WXCONFIG) --libs gl` -framework OpenGL -framework AGL
DEFINES=-D__WX_MAC__
TARGET=main
OBJECTS=
all: cube
cube: cube.cpp $(OBJECTS)
$(CC) cube.cpp $(OBJECTS) $(LINKFLAG) $(DEFINES) $(CFLAGS) -o $(TARGET)
%.o: %.cpp %.h
$(CC) -c $(CFLAGS) $(DEFINES) -o $@ $<
clean:
-rm -f *.o
-rm -f $(TARGET)