Hi, I am having trouble installing wxWidgets. Sort of a newbie here. I tried following this guide: viewtopic.php?f=19&t=45837, but something is not right. It appears that wx-config never gets installed. I have macOS Big Sur 11.2.2 and I downloaded wxWidgets 3.1.4. I also have Xcode 12.4 (but as you can see below, I never got far enough for that).
On step 3, WxWidgets seems to have been built successfully. After I configure (" ../configure --enable-debug --enable-unicode --with-osx_cocoa --with-macosx-version-min=11.0 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk") there were no errors or warnings.
After "make -j 4" there were no errors / warnings either. Same thing with samples ("cd samples; make; cd .."). I did get 2 warnings when I built the demos ("cd demos; make; cd ..") :
2 warnings:
../../../demos/forty/scoredg.h:27:16: warning: private field 'm_scoreFile' is not used [-Wunused-private-field]
ScoreFile* m_scoreFile;
../../../demos/forty/scoredg.h:28:15: warning: private field 'm_OK' is not used [-Wunused-private-field]
wxButton* m_OK;
ON STEP 4 is where I see something is wrong because when I execute "locate wx-config" nothing is returned at all. And "which wx-config" returns the error: "wx-config not found".
Any idea what the problem is? When I go to where wxWidgets is built, in the "build-cocoa-debug" folder I created as part of step 3, there is a "wx-config" reference that points to a "inplace-osx_cocoa-unicode-3.1" file in a different subfolder. Don't know if that sheds any light.
Any help would be greatly appreciated.
Thanks
Problem configuring wxWidgets in MacOS
Re: Problem configuring wxWidgets in MacOS
Hi,
From step 4:
As you followed that post, I presume you didn't run:
NOTE: You don't have to install wxWidgets. It is just for convenience.
In order to continue you should adjust the command to be:
That directory is where you ran the configure from.
Running make install installs the library, but on Mac it may interfere with the wxWidgets that is already installed by OS or any other software that uses the library.
Thank you.
From step 4:
Code: Select all
locate wx-config (shows all versions if installed)
Code: Select all
make install
In order to continue you should adjust the command to be:
Code: Select all
/path/to/wxWidgets/build/directory/wx-config --libs
Running make install installs the library, but on Mac it may interfere with the wxWidgets that is already installed by OS or any other software that uses the library.
Thank you.
Re: Problem configuring wxWidgets in MacOS
Thanks for the response. You are right, I did not do
I tried to follow your suggestion, but when I go to there is no "directory" folder? I see in the directory from where I ran configure a "wx-config.in" and a "wx-config-inplace.in" but after searching my entire computer, it is apparent that wx-config was just never installed. So weird. Maybe I should just delete everything and re-install with brew?
Code: Select all
make install
Code: Select all
/ ... /wxWidgets/build
Re: Problem configuring wxWidgets in MacOS
Hi,
You don't have to install wxWidgets!!
As I said before - this will make working with different versions of the library much harder.
Just follow my instructions below:
that is if you unpack wxWidgets into the "~/wxWidgets" directory and then ran configure from the directory called "buildMac".
Thank you.
You don't have to install wxWidgets!!
As I said before - this will make working with different versions of the library much harder.
Just follow my instructions below:
Code: Select all
cd ~/wxWidgets/buildMac
./wx-config --cxxflags
./wx-config --libs
Thank you.
Re: Problem configuring wxWidgets in MacOS
You were not supposed to take "directory" as a literal directory name. Replace this with the directory you created for a specific build/configuration, e.g. in the post you linked ( viewtopic.php?f=19&t=45837 ), that was "build-cocoa-osx"
Use the source, Luke!