Open h0tc0d3 opened 6 years ago
Compiled. tar zxf gperftools-2.7.tar.gz
cd gperftools-2.7
mkdir build
cd build
i686-w64-mingw32-configure --with-tcmalloc-pagesize=32 --disable-shared
cp src/config.h ../src/config.h
make
But have another error
/usr/lib/gcc/i686-w64-mingw32/8.2.0/../../../../i686-w64-mingw32/bin/ld: CMakeFiles/QuikLua.dir/DllMain.cpp.o:DllMain.cpp:(.text$DllMain+0x0): multiple definition of `DllMain@12'; /usr/i686-w64-mingw32/lib/libtcmalloc_minimal.a(port.o):gperftools-2.7/build/../src/windows/port.cc:165: first defined here
collect2: error: ld returned 1 exit status
Thanks. The issue seems to be building in different directory than source directory. Can you please test more traditional setup on your box ? My debian sid builds mingw target just fine in source directory and fails for same problem when I do build directory just like you.
I know it is breaking the rules, but the following patch fixes it for my box:
diff --git a/src/windows/config.h b/src/windows/config.h
index e860bc3..bb5c36e 100644
--- a/src/windows/config.h
+++ b/src/windows/config.h
@@ -9,7 +9,7 @@
unix config.h but also runs code in the windows directory.
*/
#ifdef __MINGW32__
-#include "../config.h"
+#include <config.h>
#define GOOGLE_PERFTOOLS_WINDOWS_CONFIG_H_
#endif
I use Arch linux and mingw-w64-gcc toolchain(https://aur.archlinux.org/packages/mingw-w64-gcc/). configure script use mingw-w64-configure (https://aur.archlinux.org/packages/mingw-w64-configure)
tar zxf gperftools-2.7.tar.gz
cd gperftools-2.7
mkdir build
cd build
i686-w64-mingw32-configure --with-tcmalloc-pagesize=32 --disable-shared
make