467,878 Members | 1,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,878 developers. It's quick & easy.

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

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
Mar 22 '07 #1
  • viewed: 6215
Share:
7 Replies
>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
Mar 22 '07 #2
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

"David Lowndes" wrote:
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
Mar 22 '07 #3
>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
Mar 22 '07 #4
Hello Dave,

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

thanks, Ramendra

"David Lowndes" wrote:
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
Mar 22 '07 #5
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
Mar 22 '07 #6
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.

"Jochen Kalmbach [MVP]" wrote:
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
Mar 22 '07 #7
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.

"Ramendra Kotharkar" <Ra***************@discussions.microsoft.comwrot e in
message news:31**********************************@microsof t.com...
>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.

"Jochen Kalmbach [MVP]" wrote:
>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

Mar 22 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Helmut Zeisel | last post: by
4 posts views Thread by Rookie | last post: by
1 post views Thread by Arnaud Debaene | last post: by
reply views Thread by zhangrusi | last post: by
5 posts views Thread by info | last post: by
reply views Thread by jack112 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.