I am trying to compile Qt (Windows 7, mingw32-g++ 32-bit under msys) and ld is running out of memory. Does anyone know why? Or perhaps a workaround? Thanks!
$ g++ -mthreads -shared -Wl,--out-implib,i:/Programs/Qt/lib/libQtGuid4.a -o ../ ../lib/QtGuid4.dll object_script.QtGuid.Debug -L'i:/Programs/Qt/lib' -L'i:/Pro grams/Qt/lib' -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 tmp/obj/debug_shared/QtGuid_resource_res.o -lmsimg32 -lshell32 -lQtCored4 -lz i:/programs/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: o ut of memory allocating 133614056 bytes collect2.exe: error: ld returned 1 exit status
ld.exe
large address aware usingeditbin /largeaddressaware ld.exe
- editbin comes with the Microsoft C/C++ toolchain, maybe it's in the SDK as well. This will make 4GB available to the process, but if the program has bugs dealing with pointers that have the high bit set (a common problem, which is why there's a special bit in the image's header to enable the feature) you might just run into other problems. So make a backup copy ofld.exe
to revert to if necessary. – Michael Burr