Build results in unusual behaviour Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
AUser
Knows some wx things
Knows some wx things
Posts: 38
Joined: Mon Jun 26, 2006 12:18 am

Build results in unusual behaviour

Post by AUser » 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
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 [email protected] $<

clean:
-rm -f *.o
-rm -f $(TARGET)
[/quote]

chris
I live to help wx-kind
I live to help wx-kind
Posts: 150
Joined: Fri Oct 08, 2004 2:05 pm
Location: Europe

Post by chris » Mon Jun 26, 2006 8:15 am

Hi,

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
this->signature=NULL;

AUser
Knows some wx things
Knows some wx things
Posts: 38
Joined: Mon Jun 26, 2006 12:18 am

Post by AUser » Fri Jul 07, 2006 7:38 am

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.

Post Reply