From b4fae05f748d6448a5f8e1c15e2743b914c65e5d Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Wed, 8 Dec 2021 21:59:46 +0100 Subject: [PATCH] crosscompiling works. --- copydlls.sh | 32 ++++++++++++++++++++++++++++++++ copyshare.sh | 4 ++++ 2 files changed, 36 insertions(+) create mode 100755 copydlls.sh create mode 100755 copyshare.sh diff --git a/copydlls.sh b/copydlls.sh new file mode 100755 index 0000000..40c44fd --- /dev/null +++ b/copydlls.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +cp -v /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libgcc_s_seh-1.dll ./ +cp -v /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libssp-0.dll ./ +cp -v /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++-6.dll ./ + +for i in `strings testmodbus-server.exe | grep -i '\.dll$' | grep -e "^lib"` +do + if [ -e /opt/W64-cross-compile/lib/$i ] + then + cp -v /opt/W64-cross-compile/lib/$i ./ + for j in `strings $i | grep -i '\.dll$' | grep -e "^lib"` + do + if [ -e /opt/W64-cross-compile/lib/$j ] + then + cp -v /opt/W64-cross-compile/lib/$j ./ + fi + if [ -e /usr/x86_64-w64-mingw32/lib/$j ] + then + cp -v /usr/x86_64-w64-mingw32/lib/$j ./ + fi + done + + fi + if [ -e /usr/x86_64-w64-mingw32/lib/$i ] + then + cp -v /usr/x86_64-w64-mingw32/lib/$i ./ + fi + +done + + diff --git a/copyshare.sh b/copyshare.sh new file mode 100755 index 0000000..4d1d3ff --- /dev/null +++ b/copyshare.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +mkdir share +