0
votes

I am using VS 2008. I have Library 5 Lib file

A.lib B.lib C.lib D.lib E.lib

A.Lib Include all the header file of B,C,D,E

Now I am trying to Use A. Lib in MFC application Sample.

I Have Included all the lib file in Sample App and All the setting like code generation,character set is same for all the project. I have made MFC application to use static lib. I am getting Linker error 2019 in Lib A.lib(A.obj) error LNK2019: unresolved external symbol "public: void __thiscall _Tables::reclaimIfPossible(....

Here reclaimIfPossible function is implemented in b.lib

1
Is there anything in a.lib named (.obj) which references an external symbol named public or maybe void? (It looks like the question is chopped off.) - wallyk
@wallyk updated the question. - Vikram Ranabhatt
@Chris_vr: So, is there a definition (not declaration) somewhere for that symbol? - wallyk
@wallyk Yes a.lib reference reclaimIfPossible which there in b.lib. - Vikram Ranabhatt
@wallyk since I am adding b.lib which contain the function reclaimIfPossible.Isn't that sufficient - Vikram Ranabhatt

1 Answers

0
votes

You must link to all libraries.

Only linking to A.lib will only give you symbols for methods defined in A.lib. If anything in A.lib uses anything from the other libraries, you'll get unresolved external symbol.