Compiling GUI on Mac OSX Problems
BlitzMax Forums/MaxGUI Module/Compiling GUI on Mac OSX Problems
| ||
This is my first MaxGUI attempt and I'm having trouble compiling the code on Mac OSX using 1.30. It fails to link because it can't find certain functions like CreateWindow(). I have the proper Import (MaxGUI.drivers) and it compiles fine on the PC. I thought, at first, it was my code because I can compile the examples fine when I click on them in the help file. But, I opened my BMX file that contains my GUI code, deleted it and copied the example code into. It still fails to compile. There is absolutely no difference between the two files. Am I doing something wrong? Thanks. |
| ||
Are the maxgui modules that you downloaded in BlitzMax/mod/ ? So, for example, you would have : BlitzMax/mod/maxgui.mod/ BlitzMax/mod/maxgui.mod/cocoamaxgui.mod/ etc |
| ||
Yes. I had to unzip them into there. I'm pretty sure I verified that. It wasn't complaining about the Import statement so it must have found the module. Also, the example code from the help files for MaxGUI compiles fine. But copying that code into the file that I created, didn't work. |
| ||
Have you tried running the fail-safe "Rebuild All Modules" from the IDE's Program menu? |
| ||
Yup. I did. I thought that was the issue too since I hadn't recompiled after my upgrade. But no go. However, I would think that the exact same code should compile no matter what the file is named or where it is located. But it seems to compile in the example code file fine but not in my file -- both on the Mac. I just don't see where the difference is. |
| ||
Where is your file stored? Is it on the same HDD as your BlitzMax installation? Is it on a read-only volume? Is it on a network share? Can you copy and paste into this thread the exact output you are getting? |
| ||
It was on a USB external drive (I don't believe I've ever compiled from there before) but it is Read and Writable because I copy and paste files to there all of the time. When it first failed, I did a Save As to the same drive as Blitz. Still got an error. Then I saved the file to the same folder as the example code thinking that it was picking up some mysterious file that I didn't know you had to have for GUI to work (like a resource file or something) and I still got an error. :) I'll try it again so I can get you the errors and the code. May be I'm just nuts. But I think I'm just missing something simple. |
| ||
Here are the errors: Building GUITest Compiling:GUITest.BMX Linking:GUITest.debug Undefined symbols: "_maxgui_maxgui_CreateTreeView", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o "_maxgui_maxgui_AddTreeViewNode", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o _55 in GUITest.BMX.gui.debug.macos.x86.o "_maxgui_maxgui_SetGadgetLayout", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o "_maxgui_maxgui_TreeViewRoot", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o "___bb_drivers_drivers", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o "_maxgui_maxgui_CreateWindow", referenced from: _55 in GUITest.BMX.gui.debug.macos.x86.o ld: symbol(s) not found collect2: ld returned 1 exit status Build Error: Failed to link /Users/Redspark/BlitzMax/BlitzMax/docs/html/Modules/GUI/MaxGUI/GUITest.debug.app/Contents/MacOS/GUITest.debug Process complete and Code: ' createtreeview.bmx Import MaxGui.Drivers Strict Local window:TGadget=CreateWindow("My Window",50,50,240,240) Local treeview:TGadget=CreateTreeView(0,0,200,200,window) SetGadgetLayout treeview,2,2,2,2 Local root:TGadget=TreeViewRoot(treeview) Local help:TGadget=AddTreeViewNode("Help",root) AddTreeViewNode "topic 1",help AddTreeViewNode "topic 2",help AddTreeViewNode "topic 3",help Local projects:TGadget=AddTreeViewNode("Projects",root) AddTreeViewNode "project 1",projects AddTreeViewNode("project 2",projects) AddTreeViewNode("project 3 is a big waste of time",projects) While WaitEvent() Print CurrentEvent.ToString() Select EventID() Case EVENT_WINDOWCLOSE End End Select Wend This code compiles in the example but not when I copied and pasted into another file. Both files are duplicates as far as I can tell. Thanks. |
| ||
Any suggestions? Thanks. |