Archived from groups: microsoft.public.windowsxp.device_driver.dev (More info?)
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.
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.