ONEEYEMAN wrote: ↑Mon Feb 14, 2022 2:52 pm
Hi,
Just build the minimal sample that comes with the library.
Or you installed it through the package manager?
Thank you.
Hello,
Thank you for your reply. I cded into /wxWidgets-3.1.5/samples/minimal, ran make and looked at the commands which were executed. Then I made this bash script make.sh which runs the same commands for my application
Code: Select all
/Applications/wxWidgets-3.1.5/bk-deps g++ -std=gnu++11 -mmacosx-version-min=10.10 -c -o my_application_my_application.o -I/Applications/wxWidgets-3.1.5/lib/wx/include/osx_cocoa-unicode-static-3.1 -I../../include -D_FILE_OFFSET_BITS=64 -D__WXOSX_COCOA__ -I. -I./../../samples -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -O2 -fno-common -dynamic -fPIC -DPIC -dynamic -fPIC -DPIC `wx-config --cxxflags` -I/usr/local/include/gsl/ ./my_application.cpp
g++ -std=gnu++11 -mmacosx-version-min=10.10 -o my_application my_application_my_application.o -L/Applications/wxWidgets-3.1.5/lib -framework IOKit -framework Carbon -framework Cocoa -framework QuartzCore -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_core-3.1 -lwx_baseu-3.1 -lwxtiff-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -framework WebKit -lwxregexu-3.1 -framework IOKit -framework Carbon -framework Cocoa -framework QuartzCore -framework AudioToolbox -framework System -framework OpenGL -lz -framework Security -lpthread -liconv -lz -framework Security -lpthread -liconv `wx-config --libs` -lgsl -lcblas
rm -rf my_application.app
mkdir -p my_application.app/Contents
mkdir -p my_application.app/Contents/MacOS
mkdir -p my_application.app/Contents/Resources
sed -e "s/IDENTIFIER/`echo . | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/my_application/" \
-e "s/VERSION/3.1.5/" \
/Applications/wxWidgets-3.1.5/src/osx/carbon/Info.plist.in >my_application.app/Contents/Info.plist
/bin/echo "APPL????" >my_application.app/Contents/PkgInfo
ln -f my_application my_application.app/Contents/MacOS/my_application
cp -f /Applications/wxWidgets-3.1.5/src/osx/carbon/wxmac.icns my_application.app/Contents/Resources/wxmac.icns
The script looks similar to the one suggested by doublemax.
This creates my_application.app, which appears to run correctly. Is there anything wrong with the script that I wrote? Also, the original .cpp code uses some input data files, shall I put these files in my_application.app/Contents/Resources?
Thank you! This looks great.