Issue Compiling on OSX
BlitzMax Forums/Brucey's Modules/Issue Compiling on OSX
| ||
I'm just now trying to get wxMax working and the sample app helloworld.bmx won't compile using the tweaked MaxIDE. The modules compiled fine and I am using the appstub module. Here are my system specs: 17" Macbook Pro, 2.33ghz, 3GB OSX 10.4.11 XCode 2.5 wxMax Revision 349 Here is the compile error: Building hello_world Compiling:hello_world.bmx Linking:hello_world /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _HIWindowGetAvailablePositioningBounds _HIGetMousePosition _usleep$UNIX2003 _waitpid$UNIX2003 _PMPrinterGetOutputResolution _mktime$UNIX2003 _strptime$UNIX2003 _chmod$UNIX2003 _close$UNIX2003 _fsync$UNIX2003 _read$UNIX2003 _write$UNIX2003 _open$UNIX2003 _strerror$UNIX2003 _system$UNIX2003 _fputs$UNIX2003 _kill$UNIX2003 _select$UNIX2003 _sleep$UNIX2003 _strtod$UNIX2003 collect2: ld returned 1 exit status Build Error: Failed to link /Applications/BlitzMax/mod/wx.mod/samples/hello_world.app/Contents/MacOS/hello_world Process complete |
| ||
Ah... I'm guessing this is a gcc version thing... where I've built the libs with 10.5 and your trying to link them with 10.4. That's going to be a problem :-/ There are some ways around this tho... 1) You upgrade to 10.5. 2) We (You?) make a build of the static libs for Intel 10.4 No. 2 is probably the easiest course of action. I can step you through the process, if you like, and then we could add those libs to the ones available for download. Hmm... unless I can work out how to build for 10.4 here... gonna see what I can come up with... |
| ||
Okay... so it wouldn't build as a 10.4 binary on my 10.5. Still, it was worth a try :-) So... your mission, should you choose to accept it, is to : 1) download wxwidgets 2.8.7 "wxAll" from http://www.wxwidgets.org/downloads/ Either of the three formats (.tar.gz / .zip / bz2) 2) Extract to your drive somewhere. 3) Open a terminal session, and cd to the newly extracted wxWidgets-2.8.7 directory. 4) Type/copy/paste : ./configure --enable-unicode --with-opengl --enable-mediactrl --enable-graphics_ctx --disable-shared --with-expat=builtin <EDIT> 4.5) Type make to build the library... (quite important that one!) </EDIT> 5) Wait ... :-) 6) All going well, you will end up with a "lib" folder containing a set of static libraries (lots of files ending in .a). This is the same set as you use wxMax. 7) Create a "macosx86" folder in your wx.mod/lib folder. If there's one already there, you can either rename it first, or remove it. 8) Copy everything in the recently compiled lib folder to the macosx86 folder, including the "wx" folder. 9) browse down into that wx folder, into "include", until you see a folder named something like "mac-unicode-release-static-2.8.7" You need to remove the number part so that the folder name is simply "mac-unicode-release-static" 10) You may need to rebuild your wxMax modules to pick up the lib changes. Any volunteers (with an Intel 10.4) ? :-) |
| ||
Hey thanks for the response! Unfortunately I won't be upgrading for a little while yet. I'm happy to help with any building you may require, as this is for a work project. |
| ||
Working on the static build now, I'll let you know if I succeed. |
| ||
Updated to include the most important command - make. The above ./configure should work, as it's the one I've always used, and will get you everything the BlitzMax modules expect to be there. Cheers :-) |
| ||
So far so good, i'm just waiting(step 5) right now :) |
| ||
Success! I'm working on sending you the finish build. |
| ||
Here is a finished static lib build of 2.8.7 for Intel 10.4.11 http://www.mediafire.com/?mu01dyjrjj3 |
| ||
Hrrmm no how do I use wxFormBuilder? |
| ||
Thanks for the libs ! I suppose I should sort out the PPC build now :-p As for wxFormBuilder, once you find a version that runs, it might take a wee while to get used to it. Here's a quick tutorial for a basic window : 1) Click on Forms tab, select a Frame. 2) Click on Layout tab, select a wxBoxSizer (first in the list). 3) Click on Containers tab, select a wxPanel. 4) Click on Layout tab, select a wxBoxSizer. 5) Click on Common tab, select a wxButton. 6) In the Properties, change the label to "Click me!" 7) Click on the Events property tab. 8) In the OnButtonClick event, add "OnClickMe" Congratulations, you have created a window with a button which reacts to click events :-) * The sizers thing does take a bit of getting used to, but once you do it's very quick to lay-out even complex designs. |
| ||
Here's another short tutorial : http://wiki.wxformbuilder.org/Tutorials/UsingWxFormBuilder For wxMax, steps 9 onwards don't apply, as that's where wxCodeGen comes in. |