views:

97

answers:

1

IDE: VS2005

Say I am using Poco library and the executable needs below dlls. I have to put them in same directory where the executable is.

msjava.dll
msvcp80.dll
msvcr80.dll
PocoFoundation.dll
PocoNet.dll

Is there any way that can build a dll-free executable? Thanks.

+1  A: 

They don't have to be in the same directory. They can be in another directory if your PATH variables includes the directory they are in.

It looks like the Poco libraries can be downloaded as source, so you should be able to build them as static libraries and make a stand alone executable.

Update

For the msvc DLL's, you can build against static libraries. Bring up the properties of your project, go to C/C++, Code Generation and modify "Runtime Library". Make sure to choose a library other then "Multi-threaded DLL" or "Multi-threaded Debug DLL." You will also want to make sure you do that for the Poco libraries as well.

R Samuel Klatchko
thanks I know this. But the problem is some machines certainly don't have VS2005 installed and there're no msvcp80.dll msvcr80.dll on it. That's why I asked this question.
Stan
@Stan - updated answer
R Samuel Klatchko
Would you please explain a bit more on how to do that? Should I include those library source code in the solution and change the property to static library (where?). Should I change anything in the main project? Thanks.
Stan