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

0 Members and 1 Guest are viewing this topic.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
[C++] People Can't Run My Exe's
« on: October 10, 2009 »
Hi,

Have a problem, with either multithreaded dll, or multilthreaded, other people can't run my executables. Apparently they get configuration errors. And I dont know what to do about fixing it.

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

Challenge Trophies Won:

Offline efecto

  • C= 64
  • **
  • Posts: 90
  • Karma: 4
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #1 on: October 10, 2009 »
Depends what you're doing offcourse.

using any 3th party libraries that need installing?

microsoft visual C++ 2005 redistributables?


Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #2 on: October 10, 2009 »
Quote
Apparently they get configuration errors.

Which errors, what is the message on the errors?

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: [C++] People Can't Run My Exe's
« Reply #3 on: October 10, 2009 »
Im not exactly sure mate, as I've not recieved these myself when I run the exe's on my PC.

I do know that I get a cpu.obj link warning, no matter what I do with using tinyptc.

And im just compiling a program without any external dlls.

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

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 #4 on: October 10, 2009 »
Any time you use multithreaded dll then those people will need to have the latest visual C runtime dlls installed.  That's why I've been trying to get you to use multithreaded instead.

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 #5 on: October 10, 2009 »
Dude, i am using Multithreaded now. But they still can't get zem working.

<edit> Just thought, all custom includes - for example #include gfx_2d.cpp" "gfx_2d.h" "tinyptc_ext.h" these need to be re-built in multithreaded too right?

Cheers for your help, patience and time,
Clyde.
« Last Edit: October 10, 2009 by Clyde »
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

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 #6 on: October 10, 2009 »
No.  They're just source code.

You'll need to find out exactly what the error message is and tell us, or post a not-working exe up to the forum.

Jim
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [C++] People Can't Run My Exe's
« Reply #7 on: October 11, 2009 »
@Clyde:
hi, any chance to d/l the exe for testing and taking a small look into the exe to see which dll's it need?
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
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 #8 on: October 11, 2009 »
The funny thing is I tried to run this on my Mums pc, which doesnt have any programming related stuff on and it worked. However other people I've sent this to are witnessing the following:

Quote from: Application Error
This application failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.

@Vain: Yeah sure, im very much hoping that it doesnt need any dll's; freebasic and blitz didnt require extra dll's
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [C++] People Can't Run My Exe's
« Reply #9 on: October 11, 2009 »
Seems the exe require following dll:
MSVCR90.dll

Btw, here it works... but still runs to fast...
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
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 #10 on: October 11, 2009 »
Just out of interest are you generating a manifest file? for some weird reason MSVS express 2008 produces exes that don't work on my computer unless I generate the manifest file. This problem is something to do with the linker cos crinkled apps work with or without a manifest file.

Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [C++] People Can't Run My Exe's
« Reply #11 on: October 11, 2009 »
Continue...

as far as i see, you are using following functions / stuff from the MSVCR90.dll

_amsg_exit
_getmainargs
_cexit
_XcptFilter
_initenv
_initterm
_initterm_e
_configthreadlocale
_setusermatherr
_adjust_fdiv
__p__commode
__p__fmode
_encode_pointer
__set_app_type
__dllonexit
_lock
_onexit
_decode_pointer
_except_handler4_common
_invoke_watson
_controlfp_s
_crt_debugger_hook


Code: [Select]
Your manifest:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
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 #12 on: October 11, 2009 »
@Rain Storm: Yep, im generating manifests, what they are I dont quite know.
@Va!n: thanks, i was hoping that I could keep it as a single executable. doesnt sound like thats possible in C++. However doesnt explain how it works on my parents PC. which doesnt have any VC stuff on.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [C++] People Can't Run My Exe's
« Reply #13 on: October 11, 2009 »
Just check if the dll is available on your parents pc... if so, possible any program that has been installed in the past, has still installed the dll too... (if you find the dll on your parents pc, just copy it to your pc and try if the exe works)...

Btw, afaik you can create executables with dynamic and static linked stuff...  maybe this helps:
http://msdn.microsoft.com/en-us/library/abx4dbyh%28VS.80%29.aspx
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
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 #14 on: October 11, 2009 »
Quote
i was hoping that I could keep it as a single executable. doesnt sound like thats possible in C++.
Of course it is possible.  For whatever reason though, your project is generating a reference to the C runtime dlls.

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 #15 on: October 11, 2009 »
Ah ok, I thought there was. Perhaps its a simple solution like something in either the linker or project settings; again I wouldnt know what that was.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

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 #16 on: October 11, 2009 »
Yes, if you've already set 'multithreaded' instead of 'multithreaded dll', it could be to do with one of the libtinyptc_ext or libmmx libs needs the dll version.  In which case there's nothing you can do except beg Rbz to change it.  I'm pretty sure he was able to remove all C runtime stuff from libptc, but maybe not in the version you're using.

Jim
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: [C++] People Can't Run My Exe's
« Reply #17 on: October 11, 2009 »
@Clyde:
just one idea i come up... what about linking the original needed dll into the original exe? I know their are some tools available to merge a lot files like  exe + images + sound + DLLs to just one executeable. Personally i have never tried this but its just an idea.
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
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 #18 on: October 11, 2009 »
Thanks all, really appreciate your help and suggestions :)

I've put in a request to mighty rbz. As an exe of 14kb has now grossed 75kb, and thats an experiment without using any gfx or sonix.

Cheers and have a good one,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

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 #19 on: October 11, 2009 »
That will happen if you use multithreaded - the code that was in the dll is linked directly to the application avoiding the need for the dlls to be on the users' computers but makes your exe bigger.  To make smaller applications you have to use fewer C runtime library calls - ideally none at all - the fewer you use the smaller the amount of code that needs to be linked in.

I'm amazed at how much trouble it has been to get you up and running.  Without the ptc problems you'd have been miles ahead by now.  I don't think anyone has really tried it before.  I mostly use my own routines.

By the way, your problems have a well known name - it's called DLL Hell.

Jim
« Last Edit: October 11, 2009 by Jim »
Challenge Trophies Won: