Dave August
Guest
|
Posted:
Tue Oct 26, 2004 8:14 pm Post subject:
Re: linking problem in driver |
|
|
Sushantp,
First you'd probably get a bettter set of responses to your question from
from the news group
microsoft.public.development.device.drivers
they discuss filter drivers over there a lot, this group is more
system/applications stuff..
Second, most people think using CPP in drivers is not a good thing, one of
the problems is that you are not compiling/linking with the compiler/linker
that comes with the DDK and most people feel that for stable drivers
including filters you should use those tools.
Good luck
"sushantp" <sushatnp@covelix.com> wrote in message
news:OVKVgiruEHA.1392@tk2msftngp13.phx.gbl...
| Quote: | Hi ,
I am trying to build a FS filter driver wherein i have a .cpp file and
some
.c files. I want to use a function from .cpp file in a .c file.
The .cpp file has the desired function declaration in extern "C" { ...}
: extern "C" int abc();
: int abc(){ ... }
and
the .c file has the plain function declaration and uses the function
: int abc();
: void xyz(){ abc(); }
while linking these files together i get "LNK2019 :unresolved external
symbol _abc@0 referenced in function _xyz@0"
When i looked into .obj files for these .cpp and .c files and found
"_abc@0"
in both.I think that is what it should be and still i cannot
identify the problem.
The sources file i used looks something like(I have cut the irrelevant
matter) :
TARGETNAME=xyz
TARGETPATH=obj
TARGETTYPE=DRIVER
BASEDIR=..
DRIVERTYPE=FS
USE_MAPSYM=1
USE_NATIVE_EH=1
USER_C_FLAGS=/Tpa.cpp #a.cpp file contains the function to be used
C_DEFINES= /I$(BASEDIR)\include
SOURCES=b.c #b.c file uses the function from a.cpp
Anyone who has encountered similar problem plz help.
Thanx
Sushant
|
|
|