fix: enforce global flags and clean build for ofxPiMapper to resolve undefined reference errors
This commit is contained in:
@ -276,10 +276,15 @@ for f in $(find src -type f -name "*.cpp"); do
|
||||
grep -q "<algorithm>" "$f" || sed -i '1i #include <algorithm>' "$f"
|
||||
done
|
||||
|
||||
# Build Example (Force C++17 for better compatibility with this addon)
|
||||
# Build Example
|
||||
cd "$REAL_HOME/openFrameworks/addons/ofxPiMapper/example_basic"
|
||||
echo "Starting compilation (Forcing C++17)..."
|
||||
sudo -u "$REAL_USER" make -j1 USER_CFLAGS="-Wno-error -std=c++17" USER_CPPFLAGS="-std=c++17"
|
||||
echo "Cleaning old objects to ensure consistent symbol generation..."
|
||||
sudo -u "$REAL_USER" make clean
|
||||
|
||||
echo "Starting compilation (Global Flags)..."
|
||||
# Using PLATFORM_CFLAGS ensures these flags propagate to the addon source as well
|
||||
GLOBAL_FLAGS="-Wno-error -Wno-reorder -Wno-sign-compare -Wno-delete-non-virtual-dtor -std=c++17"
|
||||
sudo -u "$REAL_USER" make -j1 PLATFORM_CFLAGS="$GLOBAL_FLAGS" USER_CFLAGS="$GLOBAL_FLAGS" USER_CPPFLAGS="-std=c++17"
|
||||
cp bin/example_basic /usr/local/bin/ofxPiMapper
|
||||
chmod +x /usr/local/bin/ofxPiMapper
|
||||
|
||||
|
||||
Reference in New Issue
Block a user