0

Linker error

Hi I have a solution which has multiple projects... Out of all project , one project is concern for us for this question. Let me tell that project named as test has two headers... Those two headers are in different directories... Both of them are added in precompile header file... Now both directory having .cpp file corresponding to headers. Assume that a.h and a.cpp in one folder. Also, a.cpp include a.h. now , b.h and b.cpp in different directory.b.cpp includes b.h and a.h. When I am calling function of a.h defined in a.cpp from file b.cpp, I am getting linker error... When a.h itself has inline function definition inside class declaration (not in a.cpp) and calling that function from b.cpp, it is not having any error for linking... Could anyone help me how to avoid this linker error as I need to declare function in .h and define in .cpp only Hope I have make query clear..feel free to ask for clarification in case it is not clear... Many thanks for reading this long query description and suggestions.

2nd Nov 2020, 9:12 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Respuesta