|
-
May 21st, 2001, 03:36 AM
#1
Thread Starter
Hyperactive Member
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.
-
May 21st, 2001, 03:41 AM
#2
Frenzied Member
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."
-
May 21st, 2001, 03:50 AM
#3
Frenzied Member
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.
-
May 21st, 2001, 03:54 AM
#4
Thread Starter
Hyperactive Member
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.
-
May 21st, 2001, 03:59 AM
#5
Thread Starter
Hyperactive Member
Vlatko Thanx.
I figured that out though hehe thanx for replying though i really appreciate it
-
May 21st, 2001, 10:52 AM
#6
Monday Morning Lunatic
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
-
May 21st, 2001, 05:27 PM
#7
Thread Starter
Hyperactive Member
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
-
May 21st, 2001, 05:53 PM
#8
Thread Starter
Hyperactive Member
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?
-
May 22nd, 2001, 03:25 AM
#9
Frenzied Member
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."
-
May 22nd, 2001, 12:10 PM
#10
Monday Morning Lunatic
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
-
May 22nd, 2001, 03:20 PM
#11
Thread Starter
Hyperactive Member
aight
Thanx for the info.
-
May 22nd, 2001, 03:25 PM
#12
Monday Morning Lunatic
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
-
May 22nd, 2001, 04:08 PM
#13
Frenzied Member
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."
-
May 22nd, 2001, 04:11 PM
#14
Monday Morning Lunatic
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
-
May 22nd, 2001, 04:42 PM
#15
Frenzied Member
*****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."
-
May 22nd, 2001, 04:44 PM
#16
Frenzied Member
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."
-
May 22nd, 2001, 05:08 PM
#17
Thread Starter
Hyperactive Member
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 ??
-
May 22nd, 2001, 07:02 PM
#18
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|