Author Topic: [C++] People Can't Run My Exe's  (Read 12946 times)

0 Members and 1 Guest are viewing this topic.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: [C++] People Can't Run My Exe's
« Reply #20 on: October 12, 2009 »
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:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #21 on: October 12, 2009 »
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:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #22 on: October 12, 2009 »
@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)
« Last Edit: October 12, 2009 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [C++] People Can't Run My Exe's
« Reply #23 on: October 12, 2009 »
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:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #24 on: October 12, 2009 »
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:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: [C++] People Can't Run My Exe's
« Reply #25 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.

..., 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:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #26 on: October 12, 2009 »
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.
« Last Edit: October 13, 2009 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #27 on: October 14, 2009 »
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.
« Last Edit: October 14, 2009 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [C++] People Can't Run My Exe's
« Reply #28 on: October 14, 2009 »
Good stuff :D

Challenge Trophies Won: