Unresolved Externals creating driver
From: Susan (susan_at_pile_HATE_SPAM_DOT_com)
Date: 10/04/04
- Next message: Maxim S. Shatskih: "Measuring the cellphone signal strength?"
- Previous message: Nguyen Nguyen: "Kernel Startup Stuck"
- Next in thread: Susan: "Re: Unresolved Externals creating driver"
- Reply: Susan: "Re: Unresolved Externals creating driver"
- Reply: Dean Ramsier: "Re: Unresolved Externals creating driver"
- Reply: Steve Schrock [MS]: "Re: Unresolved Externals creating driver"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 4 Oct 2004 14:22:54 -0400
Well, I'm a little disappointed in myself in that I'm resorting to help this
early, but...
All I'm trying to do is take the current USB Mass Storage Class and create
an identical driver, under a different name.
I've tried three different scenarios, in order to create a 'dummy' driver
based on the USB Mass Storage Driver class. In all three cases, I wind up
with undefined externals/multiply defined objects. (I thought maybe I didn'
t create my platform correctly - didn't pull in all the needed files, but
one of my attempts at creating this 'dummy' driver doesn't even use PB. And
I get the exact same error messages.)
I grab the directory
C:\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\STORAGE\CLASS
and copy it to
C:\WINCE420\PLATFORM\ARMINTEGRATOR\DRIVERS
then rename the directory 'USBPDI'.
Now, according to "How to Create a Device Driver" (from MS instructions), I
am supposed to rename the "sample driver files to names that correspond with
the intended functionality of" my driver. So,
usbmsc.c becomes usbpdi.c
usbmscp.h becomes usbpdip.h
(OK. On my third attempt I ran out of descriptive names for device
functionality, and was very close to becoming crass.)
The files 'sources' is edited:
TARGETNAME = USBMSC_LIB becomes TARGETNAME=USBPDI_LIB
SOURCES = \
BOT.C \
CBIT.C \
USBMSC.C \
becomes
SOURCES = \
BOT.C \
CBIT.C \
USBPDI.C \
Finally,
WINCEOEM=1
is added to the 'sources' file.
I have a 'platform' created into which I add a project of type WCE dynamic
link library - an empty project. Once created, I drag all the files in
directory
C:\WINCE420\PLATFORM\ARMINTEGRATOR\DRIVERS
into the newly created project. (Well, all the files except 'makefile'.)
Naturally, I didn't change the #include directives to match the above
changes, so I have to edit bot.h, cbit.h and usbpdi.c, and change
#include "usbmscp.h" to #include "usbpdip.h"
I build once again, only to get "Cannot open include file: 'warning.h': No
such file or directory". So I add the following data to the Project
Settings, C/C++ tab, Additional Include Directories:
C:\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\COMMON
And rebuild. And get "Cannot open include file: 'usbmsc.h': No such file or
directory".
So back to the same Tab in the Project Settings to add
C:\WINCE420\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\STORAGE\INC
to the Additional Include Directories.
Rebuild.
And this is where it all falls apart.
I get in this vicious circle of putting in a reference to a library, then
having the build complain about multiply defined symbols.
Complaint: unresolved external symbol ResetDefaultEndpoint referenced in
function BOT_MassStorageReset
So I add usbd_lib.lib as an Object/Library Module on the Link tab of Project
Settings, and since the build still complains, I also have to give it the
path where it can find that darn library. So as an Additional Library Path,
I add C:\WINCE420\PUBLIC\COMMON\OAK\LIB\ARMV4I\RETAIL
Now I have "error LNK2005: ClosePipe already defined in usbpdi.obj", in
addition to the original error about ResetDefaultEndpoint.
And no matter what I do, I can't seem to resolve these?
>From another post, I read that all I should need to include is usbd_lib.lib.
Obviously, whatever I'm during wrong, I'm doing CONSISTENTLY wrong, since I
can't get away from these messages.
I'm leaning towards the problem being in the paths I added via Project
Settings - meaning I should not have hardcoded the values, but used more
'generic' versions. But, I haven't been able (yet) to determine what those
'generic' paths should look like.
Any help would be appreciated.
- Next message: Maxim S. Shatskih: "Measuring the cellphone signal strength?"
- Previous message: Nguyen Nguyen: "Kernel Startup Stuck"
- Next in thread: Susan: "Re: Unresolved Externals creating driver"
- Reply: Susan: "Re: Unresolved Externals creating driver"
- Reply: Dean Ramsier: "Re: Unresolved Externals creating driver"
- Reply: Steve Schrock [MS]: "Re: Unresolved Externals creating driver"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|