Page 1 of 1

which makefile to use on mac?

Posted: Sat Dec 28, 2019 2:55 pm
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

Re: which makefile to use on mac?

Posted: Sat Dec 28, 2019 3:08 pm
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?

Re: which makefile to use on mac?

Posted: Sat Dec 28, 2019 4:28 pm
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

Re: which makefile to use on mac?

Posted: Sat Dec 28, 2019 4:33 pm
by doublemax
Sorry, i don't work under OSX, so i can't help with XCode.

Re: which makefile to use on mac?

Posted: Sat Dec 28, 2019 10:33 pm
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.

Re: which makefile to use on mac?

Posted: Sun Dec 29, 2019 8:39 am
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

Re: which makefile to use on mac?

Posted: Sun Dec 29, 2019 9:13 am
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.

Re: which makefile to use on mac?

Posted: Mon Dec 30, 2019 4:36 pm
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.

Re: which makefile to use on mac?

Posted: Thu Jan 02, 2020 10:22 am
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