Results 1 to 18 of 18

Thread: Filesize Huge!!!!

  1. #1

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Exclamation Filesize Huge!!!!

    I currently use borland c++ 5.0. i basic compiled .exe is around 32kb. i created an exact proggie in MSVC 6.0, and it was 152kb. WHY? how do i setup msvc so that it will make exes as small as borland does ? borland is very buggy and i'm getting tired of it, msvc is smooth on my computer and is actually pretty nice, it has better error handling than borland also from what i've experienced. can somebody please help me ?????? I do not use MFC just pure API.

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Make sure that in the options all the optimisations are on, and you are compiling for the retail version, not debug version.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    If you are not sure how to do that then open your project and go:

    Build Menu->Set Active Configuration and choose Win32 Release. Now compile the exe and it will be small.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    thanx man :)

    yo it actually made a smaller .exe the borland .exe was 36kb and the MSVC was 32kb thats pretty coo

    One more question. The .exe compiles fine in borland c++, but in msvc, i get errors, there were a few can't convert long to char and char to long and stuff which i fixed, now i get this error

    --------------------Configuration: program - Win32 Release--------------------
    Compiling...
    main.cpp
    Linking...
    main.obj : error LNK2001: unresolved external symbol __imp__mciSendStringA@16
    Release/intelli.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    intelli.exe - 2 error(s), 0 warning(s)

    i'm currently using the mciSendString function to create a quick Media player, why am i getting this error in msvc and not in borland ? i'm sorry, but i'm new to msvc. thanx for any input.

  5. #5

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Vlatko Thanx.

    I figured that out though hehe thanx for replying though i really appreciate it

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    In Project Settings->Linker (make sure you're selecting the right build config) add "winmm.lib" to the list of libraries used.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Parksie Thanx

    Yo thanx alot. That solved the problem and now the .exe works perfectly and is smaller in filesize than the one created in borland

  8. #8

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Another Question

    I have a .h file that i'm including in my main.cpp as follow

    #include "functions.h"

    i notice that MSVC has a headers folder in the workspace. I thought that by simply adding the functions.h file to the headers folder, MSVC would automatically include it, but it doesn't, i get errors about undeclared identifiers? why? isn't it supposed to automatically include them if u add them to the headers foleder ? could it have been something I changed, or is it just like that?

  9. #9
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Put the header file in the same place as your .cpp file. In the window on the left showing the files in your project, right click on the headers folder and choose to add an existing file to it, and add your header to the project.
    Harry.

    "From one thing, know ten thousand things."

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Despite what the workspace is set up as, the compiler still only reads the source files. The different folders are for you, not the computer.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    aight

    Thanx for the info.

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by HarryW
    okay I completely misunderstood that last question, sorry for the useless answer I thought you were asking something else.
    All information is GOOD
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Don't be so sure. Honeybee was informing us all about the details of his daily bowel movements. You can't tell me that's good.
    Harry.

    "From one thing, know ten thousand things."

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You mean you're not interested in the chronology of someone's physical necessities? Damn...I must be the only one

    Why was he doing that, anyway?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    *****ed if I know, he was trying to make some kind of joke I think... just weirded me out personally. *Shudder*
    Harry.

    "From one thing, know ten thousand things."

  16. #16
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Oh and if you're really interested in that kind of thing, there's a few websites I could point out to you heh

    Today I saw movie which actually made me feel nauseous. I hope to do the same tomorrow
    Harry.

    "From one thing, know ten thousand things."

  17. #17

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    DAMMIT!

    MORE PROBLEMS WITH MSVC++

    i just reinstalled msvc++. I made sure that winmm.lib was in the linker settings, i also have "Dont use precompiled headers" unchecked. I'm getting this warning message now.

    LINK : warning LNK4089: all references to "WINMM.dll" discarded by /OPT:REF

    i've looked for this /OPT:REF but cannot find it. what do i do ??

  18. #18

    Thread Starter
    Hyperactive Member AAG's Avatar
    Join Date
    Aug 2000
    Location
    United States
    Posts
    411

    Nevermind.

    MSVC is wierd. at first, i had accidently told MSVC to link to winmm.dll. i got an error, so then i changed it to winmm.lib, and then i started getting the error i stated in my last reply. I created a new workspace, and added my source, headers, and resource files to it, linked to winmm.lib, and everything compiled without warnings of any kind oh well, everything is working fine now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width