• Welcome to Dark Bit Factory & Gravity.
 

[C++] People Can't Run My Exe's

Started by Clyde, October 10, 2009

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Rbz

Wow, it seems that I'm the big villain here!  :o

And no, tinyptc_ext doesn't require crt runtime, I'm sure that Clyde have a wrong vcproj config, because every C example I've posted here works fine without extra dll's.

I've attached again one example for you, just build your intro using it.

It's a bit hacked, I agree, due to the use of a renamed "MSVCRT.LIB" (MSVCRTS.LIB) library that came from MSVC6.0, which uses the default  "msvcrt.dll" present on all windows config, it's my way to make smaller exe's and worked fine so far, and also useful for crinkled programs.

Challenge Trophies Won:

Jim

I don't think you're a villain at all :)
It is a bit odd to set nodefaultlibs=true and then manually to link the crt lib - is that what you're doing?

Jim
Challenge Trophies Won:

Clyde

#22
@Jim: Now im underway thanks to you good folks, will now be getting thinking caps on for lots of stuff. And am checking out dll hell ;)

@rbz: Sorry dude, didnt mean to come across that way mate. Thanks for the example, am checking it out now. And I wouldnt know what setting(s) I have wrong in my project.

<edit> Found this so far, and that's:
configuration properties->c++->optimization->

favour size or speed: Favor Small Code (/Os)
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

rain_storm

Favour Small code is excellent on express 2008 I've gone through disassemblies and have never seen any other compiler work so hard to keep the code small.

I had a nightmare getting into C++ as well. It may appear to veteran C programmers as though its simple but when you come from a basic background there is a lot that you didn't have to worry about before. I would download example source code, try to compile, why doesn't this source code compile? Not a notion of the fact that I had to link a required lib.

Challenge Trophies Won:

Clyde

Exactly dude! :)

For the time being, I'll have to be content with the fact proggies work for others.

I'd like a tutorial if possible on how to setup a project, so it doesnt produce fat exe's; as im buggered if i can find the way to exclude those other files.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Rbz

Quote from: Jim on October 12, 2009
...
It is a bit odd to set nodefaultlibs=true and then manually to link the crt lib - is that what you're doing?
...
Yes, that way we can by pass all crt startup code and only import necessary functions from msvcrt.dll making smaller executables.

Quote from: Clyde on October 12, 2009
..., so it doesnt produce fat exe's; as im buggered if i can find the way to exclude those other files.
The vcproj config above are specially tuned for small executables, it's almost the same config that 4k intro coders have.
Challenge Trophies Won:

Clyde

#26
Thanks heaps rbz, I owe you another pint.

Is there an option or something to copy over those settings to a new project in the IDE? Plus could you list whats changed from the default settings

Cheers,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Clyde

#27
And finally wicked with a capital W!!

I wrote down all the settings for C++ and the linker and manually changed my projects ones with the new ones.

This leads to thinking about creating a template if thats possible in the express versions?

Cheers to you all,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

rain_storm


Challenge Trophies Won: