| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. wxWidgets, Dev-C++ and Mac #3824 Posted by: 2004-04-13 22:57:35 | Hello,
i did an application with Dev-C++ and wxWidgets. I want to port it under Mac. I installed wxWidgets libs for Mac and tried to compile my app. But i have a problem with the makefile. I can't find a working makefile for Mac to compile my app. can you help me ? | 2. Re: wxWidgets, Dev-C++ and Mac #3837 Posted by: upCASE 2004-04-15 15:37:29 | Hi! I'd suggest using the XCode IDE (ProjectBuilder in earlier versions). Copy one of the wxWidgets project files to you project folder and adjust the targets and add the new files. Maybe you'll have to set the directories for libs and includes. It took me a while to figure this out. Check the wxWidgets Wiki, it has some info about that topic.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 3. Re: wxWidgets, Dev-C++ and Mac #3841 Posted by: 2004-04-15 19:53:23 | ok, i tried with ProjectBuilder and it works well with the wxWidgets samples. But i wanted to know if porting was always easy : doing a app under windows and just compile it under Mac (with ProjectBuilder).
I want to build a graphic app with several windows, dialog boxes, a lot of widgets. And i want to make it with DevCpp under Windows and only compile it under Mac to run on the both plateforms. Is there any constraints ?
Any experiences about that ?
| 4. Re: wxWidgets, Dev-C++ and Mac #3842 Posted by: upCASE 2004-04-15 21:39:26 | Hi! In general this is how I work, too: Develop on Windows using Dev-C++ and then copy the stuff over to my iMac and compile it there. To compile I created a project template for wxWidgets apps and simply add the sources to this project. To find out how to create a template was the hardest part, although after all it was really easy (but not documented).
For portability I can say this: If both libs on both systems were compiled the same way, there should be no problems. I mean that if your lib for windows uses database support and your mac lib doesn't, it surely won't work. In general I didn't have major problems so far. Once there was a problem with eventhandling where a buttons "set focus" event would be generated on the mac while it worked on windows, but I hacked a little solution and now it works. Be sure to implement the correct menus and don't use stuff like MDI windows. Since Mac apps look very different opposed to windows apps you'll have to care about to little differences. As I said: In general it should work. Since OS X brought us gcc and a console development is a pretty straight forward process.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 5. Re: wxWidgets, Dev-C++ and Mac #3853 Posted by: 2004-04-16 14:21:00 | I'm working this way, too, and it's ok most of the time. I created a project folder anywhere on the mac, copied the sources to this place AND copied the "makeprog.env" file from the wxMac/src folder to this project folder. Last I created a makefile like this in the project folder:
top_srcdir = /wxMac-2.4.2 <- base dir of your wxMac installation top_builddir = /wxMac-2.4.2 <- depends on the place of your wxMac-builds program_dir = MyFolder
PROGRAM = MyProg
OBJECTS = $(PROGRAM).o \ inc/abc.o \ inc/xyz.o \ wdr/Dialog_Help_wdr.o \ wdr/Dialog_Settings_wdr.o \ wdr/Dialog_Start_wdr.o \ wdr/Dialog_User_wdr.o \ wdr/Panel_Main_wdr.o
DEPFILES= $(PROGRAM).d \ inc/abc.d \ inc/xyz.d \ wdr/Dialog_Help_wdr.d \ wdr/Dialog_Settings_wdr.d \ wdr/Dialog_Start_wdr.d \ wdr/Dialog_User_wdr.d \ wdr/Panel_Main_wdr.d
-> here a contrib-lib is included for using XML / expat: APPEXTRALIBS=$(top_builddir)/lib/libwx_macd_xrc-2.4.a include makeprog.env
-include $(DEPFILES)
That's all. Do "make" -> ready for use - in most of the cases ;-) My project has a main window, several dialogs, static and dynamic controls, changing of language at runtime, about 50 source files at the moment ... The handling is ok, you may do this. As upCase stated it will sometimes have differences to your windows solution, that you should look at manually.
Sabine
| 6. Re: wxWidgets, Dev-C++ and Mac #3929 Posted by: 2004-04-26 23:07:37 | Thank you so much for your help !
i also wanted to ask if you were using Mac OSX or 9. And i would like to use a database : SQLite (under both plateforms). Did you see anywhere some documentation and if it works well.
thank you ! | 7. Re: wxWidgets, Dev-C++ and Mac #3942 Posted by: upCASE 2004-04-29 01:39:15 | Hi! I used CodeWarrior and 2.4.2 on both OS versions. Currently I'm on OS X. Never tried to work with SQLite on the Mac, but on Windows it worked fine. With OS X and 2.5.1 you can use the wxODBC classes, because OS X actually has iOdbc under the hood. I think you'd have to use --with-odbc=system when compiling the lib.upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|