copy g++ generated exe from one to another windows machine

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

copy g++ generated exe from one to another windows machine

jayshankar nair
Hi,

I am copying the code binary from one windows xp to  other. Do i need to copy mingwm10.dll or any other dll.  I am getting the following application error " The application failed to initialize properly".

Suggestions appreciated.

Thanks,
Jay



     

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Rüdiger Ranft
jayshankar nair schrieb:
> Hi,
>
> I am copying the code binary from one windows xp to  other. Do i need to copy mingwm10.dll or any other dll.  I am getting the following application error " The application failed to initialize properly".

You need to copy mingwm10.dll, because this is the C runtime of mingw.
With the dependency walker (www.dependencywalker.com) you can inspect
which libraries you program loads.

bye
Rudi

--
GPG encrypted mails preferred.
GPG verschlüsselte Mails bevorzugt.
---> http://chaosradio.ccc.de/media/ds/ds085.pdf Seite 20 <----

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Keith Marshall
On Tuesday 13 January 2009 06:35:54 Rüdiger Ranft wrote:
> jayshankar nair schrieb:
> > I am copying the code binary from one windows xp to  other. Do i
> > need to copy mingwm10.dll or any other dll.  I am getting the
> > following application error " The application failed to
> > initialize properly".
>
> You need to copy mingwm10.dll,

Maybe; maybe not.

> because this is the C runtime of mingw.

No, it is not; MSVCRT is the C runtime used by MinGW, with bindings
provided through the mingwrt package.  mingwm10.dll is only a very
small component of mingwrt.  It provides thread clean up handlers, for
*multithreaded* applications; it is required if the application in
question is multithreaded, (compiled by MinGW, with the `-mthreads'
option), otherwise not.

> With the dependency walker (www.dependencywalker.com) you
> can inspect which libraries you program loads.

Yes, this should identify any DLLs required.  mingwm10.dll is the only
MinGW component library which *may* be required, and it may be freely
distributed.  Any other third party DLLs needed will depend on the
application itself; these may be governed by more restrictive
licences.

--

Regards,
Keith.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Lorenzo Bettini
In reply to this post by jayshankar nair
jayshankar nair wrote:
> Hi,
>
> I am copying the code binary from one windows xp to  other. Do i need to copy mingwm10.dll or any other dll.  I am getting the following application error " The application failed to initialize properly".
>
> Suggestions appreciated.
>

building the executable in a static way should require no dll, shouldn't it?

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Keith Marshall
On Tuesday 10 February 2009 14:20:14 Lorenzo Bettini wrote:
> > I am copying the code binary from one windows xp to  other. Do i
> > need to copy mingwm10.dll or any other dll.  I am getting the
> > following application error " The application failed to
> > initialize properly".
> >
> > Suggestions appreciated.
>
> building the executable in a static way should require no dll,
> shouldn't it?

Sorry to disillusion you, but you got that completely wrong.

Practically the entire C runtime, and windows API, is implemented as
DLLs, so every MinGW executable depends on at least several system
DLLs.  There is no way round that, but because they are system DLLs,
they are normally found on every windows system anyway, so you don't
have to distribute them.

All MinGW C++ applications which use multiple threads, and which also
use C++ exceptions should also be linked with -lmingwthrd, which
imposes a dependency on mingwm10.dll.  This is not a system DLL, so
you do have to distribute it, (and you are freely entitled to do so).
STFW, and in particular the archives for this list, for the
explanation of why this *cannot* be statically linked.

--

Regards,
Keith.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Lorenzo Bettini
Keith Marshall wrote:

> On Tuesday 10 February 2009 14:20:14 Lorenzo Bettini wrote:
>>> I am copying the code binary from one windows xp to  other. Do i
>>> need to copy mingwm10.dll or any other dll.  I am getting the
>>> following application error " The application failed to
>>> initialize properly".
>>>
>>> Suggestions appreciated.
>> building the executable in a static way should require no dll,
>> shouldn't it?
>
> Sorry to disillusion you, but you got that completely wrong.
>
> Practically the entire C runtime, and windows API, is implemented as
> DLLs, so every MinGW executable depends on at least several system
> DLLs.  There is no way round that, but because they are system DLLs,
> they are normally found on every windows system anyway, so you don't
> have to distribute them.
>

well, yes, for system dlls I immagined it was like that

> All MinGW C++ applications which use multiple threads, and which also
> use C++ exceptions should also be linked with -lmingwthrd, which
> imposes a dependency on mingwm10.dll.  This is not a system DLL, so
> you do have to distribute it, (and you are freely entitled to do so).
> STFW, and in particular the archives for this list, for the
> explanation of why this *cannot* be statically linked.

OK, the program I statically built uses exceptions but no threads, so,
again, it worked on another system without any additional dlls.

is there a web link that tells exactly when you need to distribute
additional dlls, and which ones?

thanks in advance
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming
Reply | Threaded
Open this post in threaded view
|

Re: copy g++ generated exe from one to another windows machine

Greg Chicares
On 2009-02-11 10:04Z, Lorenzo Bettini wrote:
>
> is there a web link that tells exactly when you need to distribute
> additional dlls, and which ones?

I'm not sure which compiler version you're using, but look in
its 'bin' directory; if the only dll there is 'mingwm10.dll'
(discussed earlier in this thread), then I suppose there's no
other MinGW-provided dll that you'd potentially need to
distribute.

For gcc-3.4.x, I find only 'mingwm10.dll'. For gcc-4.x, there
are others, depending on which build you're using and how
you're using it--see:
  http://article.gmane.org/gmane.comp.gnu.mingw.user/28941/match=dll

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

_______________________________________________
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) HTML/MIME encoded mail
3) Improper quoting
4) Improper trimming