Hi, I build my C++ project (windows DLL) with GNU C and Borland C++. Everything is fine except huge difference in resulting DLL file size. GNU C procuces almost 10 times larger file than Borland C (429568 vs 46080)! I don't belive GNU C is so unoptimized, probably my problem is in options I use for compiler/linker/dll wrapper.
1) GNU (Dev-Cpp has been used) g++.exe -c newgen.cpp -o ./obj/newgen.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -DBUILDING_DLL=1 -fno-access-control -O3 ... the same for other files in my project ... windres.exe -i Generator1_private.rc --input-format=rc -o ./obj/Generator1_private.res -O coff dllwrap.exe --output-def ../../pas/exe/maptool/libgenerator_gnu.def --driver-name c++ --implib ../../pas/exe/maptool/libgenerator_gnu.a ./obj/newgen.o ./obj/ustring.o ./obj/varstream.o ./obj/bucketlist.o ./obj/generator1_dll.o ./obj/Generator1_private.res -L"C:/Dev-Cpp/lib" --no-export-all-symbols --add-stdcall-alias -s -o ../../pas/exe/maptool/generator_gnu.dll result file size 429568 bytes 2) BCC55 bcc32 -ec:\wrk\pas\exe\maptool\generator_bcc.dll -DBUILDING_DLL=1 -c -P -WD -O2 -Vx -Ve -X- -a8 -b- -k- -vi -tWD -tWM- -q -n.\obj generator1_dll.cpp bucketlist.cpp newgen.cpp ustring.cpp varstream.cpp ilink32 -q -D"" -aa -Tpd -x -Gn -Gi -M C0D32.OBJ CW32.LIB IMPORT32.LIB , c:\wrk\pas\exe\maptool\generator_bcc.dll result file size 46080 bytes Thanks, Alexander Zemerov. _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus