Hi All,
I have a driver for WIN CE 4.2 OS, Mydriver.dll. In this driver I need to
use direct draw objects. So, included ddraw.lib under the linker options.
When I run the dll module, I get the following error:

ddraw.lib(ddmain.obj) : error LNK2005: _DllMain already defined in
MyDriver.obj

MyDriver.dll has the entry point as DllMain and ddraw.lib also has the entry
point as DllMain and hence the multiply defined symbols. How can I overcome
this? I cannot do away with ddraw.lib.

Thanks in Advance,
Johns

Re: ddraw.lib by Tim

Tim
Wed Mar 16 00:50:35 CST 2005

"Johns" <johnysmart@yahoo.com> wrote:
>
>I have a driver for WIN CE 4.2 OS, Mydriver.dll. In this driver I need to
>use direct draw objects. So, included ddraw.lib under the linker options.
>When I run the dll module, I get the following error:
>
>ddraw.lib(ddmain.obj) : error LNK2005: _DllMain already defined in
>MyDriver.obj
>
>MyDriver.dll has the entry point as DllMain and ddraw.lib also has the entry
>point as DllMain and hence the multiply defined symbols. How can I overcome
>this? I cannot do away with ddraw.lib.

That's odd. ddraw.lib should only be an import library. It shouldn't have
a "ddmain.obj" in it.

You don't happen to call your dll "ddraw.dll", do you?

ddmain.obj will only be brought in if your code is referring to one of the
other entry points. I think you're going to need to get a complete link
map and figure out what is bringing in ddmain.obj.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc