static linking (GDIPlus.dll) with an VC++ application

G

Guest

Hello,

I want to know how to statically link GDIPlus.dll with VC++ application that
should be able to run on W2k machine without the existence of GDIPlus.dll on
the target machine.

Currently, when i statically link the dll and run the application on target
(W2K) machine it throws an exception saying GDIPlus.dll file not found.

Please help.

Ramendra Kotharkar
 
D

David Lowndes

I want to know how to statically link GDIPlus.dll with VC++ application that
should be able to run on W2k machine without the existence of GDIPlus.dll on
the target machine.

You can't statically link to a DLL.

You may be confusing the situation with the 'C' and MFC libraries
where you have the option to statically link or use the DLL - but
that's because MS supply both a static library and a DLL library.

Dave
 
G

Guest

Hello Dave,

I didn't understand the difference between static library and a Dll library.
Actually, at compile time i am specifying the GDIPlus.lib as additional
dependencies so that it is linked to the application statically at compile
time.

I have a requirement where i want to statically link the GDIPlus library to
my application and then when i port it on the target machine (W2K) it should
work with the presence of the GDIPlus.dll on the target machine.

thanks, Ramendra
 
D

David Lowndes

Actually, at compile time i am specifying the GDIPlus.lib as additional
dependencies so that it is linked to the application statically at compile
time.

What you're actually doing is implicitly linking your application to
GDIPlus.dll. The GDiPlus.lib is a library for the DLL, it's not a
static library.

Dave
 
G

Guest

Hello Dave,

How do i know if a particular dll is a static library or a dll library? Any
tool to check?

thanks, Ramendra
 
J

Jochen Kalmbach [MVP]

Hi Ramendra!
How do i know if a particular dll is a static library or a dll library? Any
tool to check?

A DLL is *always* a DLL...

Greetings
Jochen
 
G

Guest

I want to know how is static library different from ordinary dll (library) ?
I am not saying static library is not a dll. I want to know how do i link to
a library statically such that when i run the application on any other
machine that doesn't have the library it should work without problem.
 
T

Ted

You can check to see if a library is purely static, or just an import
library, by using the LIB tool (using LIB /LIST) to see if there are any OBJ
files in there. If there are no OBJ files then it is a pure import library.

But that won't tell you if a library is mixed (it has some import parts and
some static parts). However, by the size of the OBJ files in the lib vs
the overall size of the lib you can tell it's mixed.

Ted.
 

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