473,387 Members | 1,304 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

GNU C vs BCC - huge output file

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

g++.exe -c ustring.cpp -o ./obj/ustring.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

g++.exe -c varstream.cpp -o ./obj/varstream.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

g++.exe -c bucketlist.cpp -o ./obj/bucketlist.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

g++.exe -c generator1_dll.cpp -o ./obj/generator1_dll.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

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.

Dec 1 '05 #1
2 2336
On 2005-12-01, azemerov <az******@inbox.ru> wrote:
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.


Consult manual about g++ command line options. Or try a newsgroup
concerned with the GNU compiler suite. Object file size is
implementation defined, and thus not on topic for this newsgroup.

--
Neil Cerutti
Dec 1 '05 #2
azemerov wrote:
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.
[..]


This is off-topic here. Sizes of resulting programs have nothing to do
with the language itself. Please ask in a GNU newsgroup (gnu.g++.help).

V
Dec 1 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Stephane | last post by:
Hello, I need to allow an end user to upload video files on a server and in the same time to put the file name and a few infos in a database. It must be very simple for the end user, and...
5
by: Earl Teigrob | last post by:
My company sells software and wants to provide downloadable product. Some of these downloads will be full CD's of over 550M I had everything working fine using Response.filewrite() but when we...
10
by: George | last post by:
Hi, I have a report which shows all records from database into the browser. The final HTML comes out about 5 Meg. It takes 1 minute 5 seconds for transfer to show up when i hit the page with IE...
12
by: Jeff Calico | last post by:
I have 2 XML data files that I want to extract data from simultaneously and transform with XSLT to generate a report. The first file is huge and when XSLT builds the DOM tree in memory, it runs...
3
by: s99999999s2003 | last post by:
hi i wrote some code to compare 2 files. One is the base file, the other file i got from somewhere. I need to compare this file against the base, eg base file abc def ghi eg another file
3
by: Lad | last post by:
What is a good way to read binary data from HUGE file and write it to another file? Thanks for help La.
8
by: blaine | last post by:
Hey guys, For my Network Security class we are designing a project that will, among other things, implement a Diffie Hellman secret key exchange. The rest of the class is doing Java, while myself...
16
by: pereges | last post by:
ok so i have written a program in C where I am dealing with huge data(millions and lots of iterations involved) and for some reason the screen tends to freeze and I get no output every time I...
1
by: psbasha | last post by:
Hi , I have to parse a huge data of 3GB and store it in the dictnoray.After storing the data ,I need to do lot of calculations and write to the output file.The application is working for 500 MB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.