which makefile to use on mac?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

which makefile to use on mac?

Post by vjedlicka »

I installed and build wxWidgets 3.1.3 (using these instructions: https://wiki.wxwidgets.org/Compiling_wx ... _wxWidgets). The samples work.

I would like to test if my app (developed on Windows) works on mac.

The plan was to copy a makefile from some sample, make changes in it and build my app.

The problem is, in the "docview" sample, there are 6 makefiles:

makefile.bcc
makefile.gcc
makefile.in
makefile.unx
makefile.vc
makefile.vms

Which makefile should I copy into my project?
Is there another (easier) way to build my app?

Thanks
Vaclav
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: which makefile to use on mac?

Post by doublemax »

I think makefile.gcc is the one that's used under OSX (not 100% sure though).

The "minimal" sample also comes with XCode project files. Maybe it's easier to use that as a start?
Use the source, Luke!
vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

Re: which makefile to use on mac?

Post by vjedlicka »

I opened the "minimal" sample project in XCode. It complained about the code being 32bit. I rebuilt the project (Product - Build). It said "build succeeded". But I cannot run it, because "Product - Run" is disabled.
I am new to Mac and Xcode so obviously I am doing something wrong.

Thanks
Vaclav
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: which makefile to use on mac?

Post by doublemax »

Sorry, i don't work under OSX, so i can't help with XCode.
Use the source, Luke!
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: which makefile to use on mac?

Post by stahta01 »

vjedlicka wrote: Sat Dec 28, 2019 2:55 pm I installed and build wxWidgets 3.1.3 (using these instructions: https://wiki.wxwidgets.org/Compiling_wx ... _wxWidgets). The samples work.

I would like to test if my app (developed on Windows) works on mac.

The plan was to copy a makefile from some sample, make changes in it and build my app.

The problem is, in the "docview" sample, there are 6 makefiles:

makefile.bcc
makefile.gcc
makefile.in
makefile.unx
makefile.vc
makefile.vms

Which makefile should I copy into my project?
Is there another (easier) way to build my app?

Thanks
Vaclav
Those are all the wrong ones to use!
Use the ones created under the build folder.
Created by "mkdir build-release".

Tim S.
vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

Re: which makefile to use on mac?

Post by vjedlicka »

stahta01 wrote: Sat Dec 28, 2019 10:33 pm
vjedlicka wrote: Sat Dec 28, 2019 2:55 pm I installed and build wxWidgets 3.1.3 (using these instructions: https://wiki.wxwidgets.org/Compiling_wx ... _wxWidgets). The samples work.

I would like to test if my app (developed on Windows) works on mac.

The plan was to copy a makefile from some sample, make changes in it and build my app.

The problem is, in the "docview" sample, there are 6 makefiles:

makefile.bcc
makefile.gcc
makefile.in
makefile.unx
makefile.vc
makefile.vms

Which makefile should I copy into my project?
Is there another (easier) way to build my app?

Thanks
Vaclav
Those are all the wrong ones to use!
Use the ones created under the build folder.
Created by "mkdir build-release".

Tim S.
Hi Tim,

Provided my app is named "wx1", are you saying I shoud copy

Code: Select all

wxWidgets/build-release/samples/docview/Makefile
to

Code: Select all

wxWidgets/samples/wx1/
?
Thank you
Vaclav
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
Joined: Fri Nov 03, 2006 2:00 pm

Re: which makefile to use on mac?

Post by stahta01 »

No.

Copy the makefile without editing it will not work.

So, using the makefile with edits is needed.

Where you copy it depends on what you want to do.

The more you change the relative location of the Makefile the more you will need to edit it.

Tim S.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: which makefile to use on mac?

Post by ONEEYEMAN »

Hi,
I would recommend to start with Xcode as it is an easier path.

Couple of questions though:

1. What OSX version do you have on you Mac?
2. What Xcode version will you use?
3. Are you creating any libraries or everything will be inside one big executable?

Thank you.
vjedlicka
Earned a small fee
Earned a small fee
Posts: 10
Joined: Sat Aug 10, 2019 11:55 am

Re: which makefile to use on mac?

Post by vjedlicka »

I plan to use the latest versions:
macOS: 10.15.2
XCode: 11.3
I plan to make just one executable using static linking.

Thanks
Vaclav
Post Reply