From: xunxun <xun...@gm...> - 2011-12-03 14:30:32
|
Also add it to CFLAGS But I don't know whether mingw ld was built using "-Wl,--large-address-aware"(the option can make ld cover 3GB memory) (qt debug objs are also very huge, and this can cost ld more memory), so you can build ld yourself using -Wl,--large-address-aware, or you can use my build : https://pcxprj.googlecode.com/files/MinGW64CRT_gcc4.6.3pre_static_win32.7z Other method is that you should build binutils with like "--host=X86_64... target=X86..." 2011/12/3 cat fa <boo...@gm...>: > Sorry. I made a mistake in my previous mail. > > It DID NOT work. > > 在 2011年12月3日 下午10:07,cat fa <boo...@gm...>写道: > >> It did work. This is a part of the content of the makefile. >> >> ####### Compiler, tools and options >> >> CC = gcc >> CXX = g++ >> DEFINES = -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE >> -DQT_LARGEFILE_SUPPORT -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE >> -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT >> -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION >> -D_USE_MATH_DEFINES -DQT_NO_DIRECTDRAW -DQT_USE_BUNDLED_LIBPNG >> -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE >> -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE >> -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQT_NO_EGL >> -DQ_INTERNAL_QAPP_SRC -DQT_DLL -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW >> -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 >> CFLAGS = -g -Wall $(DEFINES) >> CXXFLAGS = -fno-keep-inline-dllexport -g -Wall -frtti -fexceptions >> -mthreads $(DEFINES) >> >> INCPATH = -I"..\..\include\QtCore" -I"..\..\include" >> -I"..\..\include\QtGui" -I"tmp\rcc\debug_shared" -I"tmp" >> -I"..\3rdparty\wintab" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" >> -I"..\3rdparty\zlib" -I"..\3rdparty\harfbuzz\src" -I"dialogs" >> -I"..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"." >> -I"..\..\mkspecs\win32-g++" >> LINK = g++ >> LFLAGS = -mthreads -shared >> -Wl,--out-implib,d:\Lib\qt-everywhere-opensource-src-4.7.4\lib\libQtGuid4.a >> >> LIBS = -L"d:\Lib\qt-everywhere-opensource-src-4.7.4\lib" >> -L"d:\Lib\qt-everywhere-opensource-src-4.7.4\lib" -lgdi32 -lcomdlg32 >> -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 >> -ladvapi32 tmp\obj\debug_shared\QtGuid_resource_res.o -lmsimg32 -lshell32 >> -lQtCored4 >> QMAKE = d:\Lib\qt-everywhere-opensource-src-4.7.4\bin\qmake >> IDC = d:\Lib\qt-everywhere-opensource-src-4.7.4\bin\idc.exe >> IDL = midl >> ZIP = zip -r -9 >> DEF_FILE = >> RES_FILE = tmp\obj\debug_shared\QtGuid_resource_res.o >> COPY = copy /y >> COPY_FILE = $(COPY) >> COPY_DIR = xcopy /s /q /y /i >> DEL_FILE = del >> DEL_DIR = rmdir >> MOVE = move >> CHK_DIR_EXISTS= if not exist >> MKDIR = mkdir >> INSTALL_FILE = $(COPY_FILE) >> INSTALL_PROGRAM = $(COPY_FILE) >> INSTALL_DIR = $(COPY_DIR) >> >> 2011/12/3 xunxun <xun...@gm...> >>> >>> 于 2011/12/3 10:05, cat fa 写道: >>>> >>>> Thanks. >>>> I edited the makefile and added that option to g++(see the LFLAGS >>>> line), but I still got the out of memory error. >>>> ####### Compiler, tools and options >>>> >>>> CC = gcc >>>> CXX = g++ >>>> DEFINES = -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE >>>> -DQT_LARGEFILE_SUPPORT -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE >>>> -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT >>>> -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION >>>> -D_USE_MATH_DEFINES -DQT_NO_DIRECTDRAW -DQT_USE_BUNDLED_LIBPNG >>>> -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE >>>> -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE >>>> -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQT_NO_EGL >>>> -DQ_INTERNAL_QAPP_SRC -DQT_DLL -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW >>>> -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 >>>> CFLAGS = -g -Wall $(DEFINES) >>>> CXXFLAGS = -g -Wall -frtti -fexceptions -mthreads $(DEFINES) >>>> INCPATH = -I"..\..\include\QtCore" -I"..\..\include" >>>> -I"..\..\include\QtGui" -I"tmp\rcc\debug_shared" -I"tmp" >>>> -I"..\3rdparty\wintab" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" >>>> -I"..\3rdparty\zlib" -I"..\3rdparty\harfbuzz\src" -I"dialogs" >>>> -I"..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"." >>>> -I"..\..\mkspecs\win32-g++" >>>> LINK = g++ >>>> LFLAGS = -fno-keep-inline-dllexport -mthreads -shared >>>> -Wl,--out-implib,d:\Lib\qt-everywhere-opensource-src-4.7.4\lib\libQtGuid4.a >>>> LIBS = -L"d:\Lib\qt-everywhere-opensource-src-4.7.4\lib" >>>> -L"d:\Lib\qt-everywhere-opensource-src-4.7.4\lib" -lgdi32 -lcomdlg32 >>>> -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 >>>> -ladvapi32 tmp\obj\debug_shared\QtGuid_resource_res.o -lmsimg32 -lshell32 >>>> -lQtCored4 >>>> QMAKE = d:\Lib\qt-everywhere-opensource-src-4.7.4\bin\qmake >>>> IDC = d:\Lib\qt-everywhere-opensource-src-4.7.4\bin\idc.exe >>>> IDL = midl >>>> ZIP = zip -r -9 >>>> DEF_FILE = >>>> RES_FILE = tmp\obj\debug_shared\QtGuid_resource_res.o >>>> COPY = copy /y >>>> COPY_FILE = $(COPY) >>>> COPY_DIR = xcopy /s /q /y /i >>>> DEL_FILE = del >>>> DEL_DIR = rmdir >>>> MOVE = move >>>> CHK_DIR_EXISTS= if not exist >>>> MKDIR = mkdir >>>> INSTALL_FILE = $(COPY_FILE) >>>> INSTALL_PROGRAM = $(COPY_FILE) >>>> INSTALL_DIR = $(COPY_DIR) >>>> >>>> 2011/12/2 xunxun <xun...@gm... <mailto:xun...@gm...>> >>>> >>>> >>>> 于 2011/12/2 16:35, cat fa 写道: >>>> >>>> >>>> |c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: >>>> out of mem| >>>> |ory allocating 125660256 bytes| >>>> >>>> You should add -fno-keep-inline-dllexport to your compiler option >>>> and rebuild it. >>>> >>>> -- Best Regards, >>>> xunxun >>>> >>>> >>> No, -fno-keep-inline-dllexport is a compiler option, not linker option. >>> You should add it to CXXFLAGS >>> >>> >>> -- >>> Best Regards, >>> xunxun >>> >> > -- Best Regards, xunxun |