Skip to content

Commit

Permalink
Possible fix for 'Error 998 loading external' with faust2w32max6 and …
Browse files Browse the repository at this point in the history
…faust2w64max6.
  • Loading branch information
sletz committed Jan 9, 2025
1 parent b7c2c00 commit 2dac497
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions tools/faust2appls/faust2w32max6
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Cross-compiles Faust programs to Max/MSP #
# from : Linux or OSX #
# to : Windows 32 #
# (c) Grame, 2011-2024 #
# (c) Grame, 2011-2025 #
# #
#####################################################################

Expand Down Expand Up @@ -43,7 +43,7 @@ fi
: ${MINGWPREFIX="i686-w64-mingw32-"}
CXX="${MINGWPREFIX}g++"
(which "$CXX" >/dev/null) || (echo "MingW compiler $CXX not found"; exit 1)
DLLWRAP="${MINGWPREFIX}dllwrap --target=i686-w64-mingw32"
DLLWRAP="${MINGWPREFIX}dllwrap --target=i686-w64-mingw32 --dynamicbase --enable-auto-image-base"
STRIP="${MINGWPREFIX}strip"

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -111,7 +111,8 @@ for p in $FILES; do

$CXX $CXXINCS $CXXFLAGS $MC -c "${f%.dsp}.cpp" -o "${f%.dsp}.o"
$DLLWRAP --driver-name $CXX --def ${f%.dsp}.def *.o $LIBS -static -o "${f%.dsp}$EXT"
$STRIP "${f%.dsp}$EXT"
# Read: https://beta.cycling74.com/t/error-998-loading-external-generated-with-faust2max6-on-windows/3327/10
# $STRIP "${f%.dsp}$EXT"
) > /dev/null || exit

cp "$TMP/${f%.dsp}$EXT" "$SRCDIR"
Expand Down
7 changes: 4 additions & 3 deletions tools/faust2appls/faust2w64max6
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Cross-compiles Faust programs to Max/MSP #
# from : Linux or OSX #
# to : Windows 64 #
# (c) Grame, 2018-2024 #
# (c) Grame, 2018-2025 #
# #
#####################################################################

Expand Down Expand Up @@ -43,7 +43,7 @@ fi
: ${MINGWPREFIX="x86_64-w64-mingw32-"}
CXX="${MINGWPREFIX}g++"
(which "$CXX" >/dev/null) || (echo "MingW compiler $CXX not found"; exit 1)
DLLWRAP="${MINGWPREFIX}dllwrap --target=x86_64-w64-mingw32"
DLLWRAP="${MINGWPREFIX}dllwrap --target=x86_64-w64-mingw32 --dynamicbase --enable-auto-image-base"
STRIP="${MINGWPREFIX}strip"

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -111,7 +111,8 @@ for p in $FILES; do

$CXX $CXXINCS $CXXFLAGS $MC -c "${f%.dsp}.cpp" -o "${f%.dsp}.o"
$DLLWRAP --driver-name $CXX --def ${f%.dsp}.def *.o $LIBS -static -o "${f%.dsp}$EXT"
$STRIP "${f%.dsp}$EXT"
# Read: https://beta.cycling74.com/t/error-998-loading-external-generated-with-faust2max6-on-windows/3327/10
# $STRIP "${f%.dsp}$EXT"
) > /dev/null || exit

cp "$TMP/${f%.dsp}$EXT" "$SRCDIR"
Expand Down

0 comments on commit 2dac497

Please sign in to comment.