Wxwidgets building trouble.

I've never touched programming for Mac or Linux...

I know that I can compile C/++ code for these but I can't find much information on windowing environments for Mac (I'm sure I've seen something about Linux's many interfaces but I'm not bothered about that for now).
I have found a couple of cross platform libraries for windowing (such as wxWidgets, GTK+, etc) that I'm contemplating using but I want to see all my options first.
All I can find for programming windows in Mac natively are all based in Objective-C and Swift, and of course there's things like Java Swing library.

Is there anything similar to the WinAPI for Mac (i.e. a native C/++ library) and where can I find the references for this?

Cheers
Last edited on
closed account (z05DSL3A)
Is there anything similar to the WinAPI for Mac (i.e. a native C/++ library) and where can I find the references for this?
Cocoa is Apple's native object-oriented API for the OS X. You generally use Objective-C or Swift for it.
So writing for mac is gonna be a pain in the ass with C/++? :(
closed account (z05DSL3A)
You could use something like Qt (and let that talk to Cocoa) or...

...write your data and logic layers in C/C++ and just do your UI in Objective-C. Swift doesn't play nice with C/C++ at the moment but Objective-C does. Some of the subsystem APIs of OS X are written in C++.

I'm assuming that you want to be writing cross platform, if not Swift might be the way to go.


_______________________________________________________
https://developer.apple.com/library/mac/navigation/#section=Resource%20Types&topic=Getting%20Started
Okay after an admittedly rather little amount of research I wanna use wxWidgets for my cross platform project, and preferably with the same compiler across all OS so I wanna use gcc/g++ (still not entirely sure on the difference but as long as I can get one working I'm happy).

Problem is I'm having a great deal of difficulty getting wxwidgets to build correctly using the gcc compiler from the link in the wxwidgets official site. They say to use gcc 5.1.6 but the link points to mingw with gcc version 4.8.X...
I tried building with this, then hit a c++11 error, found where to add the "-std=c++11" tag and then tried again to get compilation errors.

If anyone can point me in the right direction on what compiler to use for windows (I believe getting the latest gcc for mac and Linux is pretty easy) then I'd be very happy.

Thanks
Last edited on
*bump* (sorry)
hello,
you could use configure to do this:
 
./configure CXXFLAGS=-std=gnu++11 --prefix=/home/wx --enable-static --enable-shared

i'm in windows, and i've compiled it on a server and my MSYS2 shell with that command
Actually through uninstalling and reinstalling different compilers I managed to get back to the original error that I'm having on my work pc too...
The build creates a load of "coredll_<part>.o" files, and somewhere in the building it breaks because it's looking for "coredllbuttonbar.o" without the underscore.
I've tried searching for a literal without the underscore but can't find one anywhere.
Topic archived. No new replies allowed.