visual studio 2005 SP2 redistribution issue

  • Thread starter Thread starter Peter
  • Start date Start date
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.
 
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
 
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
 
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.
 
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.
 
Back
Top