Mac Catalina - wx-widgets no such file or directory Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
eugenedakin
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Oct 12, 2020 9:21 pm

Mac Catalina - wx-widgets no such file or directory

Post by eugenedakin » Tue Oct 13, 2020 1:20 am

Hello,
I am new to programming on the Mac, and I am able to compile and run the Hello world program from https://docs.wxwidgets.org/trunk/overvi ... world.html on Windows, Ubuntu, and Raspberry Pi, and am not able to have a successful build on Mac Catalina. Many different configurations have been performed, and I am unsure as the (many?) mistakes that I performed on the OS. Here are some steps that have been performed:

wxWidgets is installed with ‘brew install wxwidgets’

‘which wx-config’ shows the path at /usr/local/bin

‘echo $PATH’ has /usr/local/bin shown

‘g++ helloapp.cpp ‘wx-config –libs’ ‘wx-config –cxxflags’ -o helloapp’ shows clang:error no such file or directory for ‘wx-config –cxxflags’ or ‘wx-config –libs’

Typing ‘wx-config –cxxflags; shows include directories and such. Typing ‘wx-config –libs’ shows frawework kits and such.

I moved the helloapp.cpp to the same directory at the wx-config file, and it is not recognized (yes, a desperate move). I see this question has been asked many times, and after a couple of days there has not been compiling success yet.

Help 😊 LOL, be gentle as I typically do not usually program on Mac. This is running on Catalina.

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

Re: Mac Catalina - wx-widgets no such file or directory

Post by doublemax » Tue Oct 13, 2020 5:11 am

The commands `wx-config –libs` `wx-config –cxxflags` must be in backticks, not single quotes. Notice the ` instead of '

Code: Select all

g++ helloapp.cpp `wx-config –libs` `wx-config –cxxflags` -o helloapp
Use the source, Luke!

eugenedakin
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Oct 12, 2020 9:21 pm

Re: Mac Catalina - wx-widgets no such file or directory

Post by eugenedakin » Sat Nov 07, 2020 6:31 am

Thank you Max. Yep, it was the back-ticks that bit me :)

Post Reply