c++ - Header and source files function definitions -
this question has answer here:
i have project , project b under 1 solution in visual studio. project needs use function of class of project b, in project b have file contains header file of project b, let's call allheadersofb.h
. file included in stdafx.h
file of project a, included in each class of project a.
i have variable of type y
in class x
, y
class of project b , x
class of project a. in x
, if try use function of y
, function declared in .h file , defined in .cpp file have unresolved external link, if function declared , defined in header file doesn't happen.
what doing wrong?
including headers not enough. guess project b
library, project a
needs link library can access implementation of class/function b
.
Comments
Post a Comment