visual studio 2005 SP2 redistribution issue

D

David Wilkinson

Peter said:
I used /MT to compile in the makefile and I really don't expect
the dll included. not sure how to make 100% static compilation?

/MT is the way to go (IMHO), and should avoid dependency on the CRT DLL's. Are
you linking static libraries into your executable? If so, they are likely the
culprit.
 
P

Peter

David said:
/MT is the way to go (IMHO), and should avoid dependency on the CRT
DLL's.

That is what I thought. but my binary still cannot run in another computer.
Are you linking static libraries into your executable? If so,
they are likely the culprit.

yes. not sure why it could be culprit. is there any command I can run t
o find out which library causes the problem?

Also, is there a way to set the compiler or link option (for my
makefile) to generate release version instead of debug version?

Thanks.

Peter
 
P

Peter

David said:
/MT is the way to go (IMHO), and should avoid dependency on the CRT
DLL's.

That is what I thought. but my binary still cannot run in another computer.
Are you linking static libraries into your executable? If so,
they are likely the culprit.

yes. not sure why it could be culprit. is there any command I can run t
o find out which library causes the problem?

Also, is there a way to set the compiler or link option (for my
makefile) to generate release version instead of debug version?

Thanks.

Peter
 
D

David Wilkinson

Peter said:
That is what I thought. but my binary still cannot run in another computer.


yes. not sure why it could be culprit. is there any command I can run t
o find out which library causes the problem?

Also, is there a way to set the compiler or link option (for my
makefile) to generate release version instead of debug version?

Peter:

/MT or /MD is release
/MTd or /MDd is debug

If you are linking static libraries that were compiled with /MD then they will
require your executable to link with the CRT DLL's. Static libraries should
always be compiled with the same version of the compiler and the same compiler
settings as the executable. Anything else may lead to linker or run time errors.
 
D

David Wilkinson

Peter said:
That is what I thought. but my binary still cannot run in another computer.


yes. not sure why it could be culprit. is there any command I can run t
o find out which library causes the problem?

Also, is there a way to set the compiler or link option (for my
makefile) to generate release version instead of debug version?

Peter:

/MT or /MD is release
/MTd or /MDd is debug

If you are linking static libraries that were compiled with /MD then they will
require your executable to link with the CRT DLL's. Static libraries should
always be compiled with the same version of the compiler and the same compiler
settings as the executable. Anything else may lead to linker or run time errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top