-2

I have A.h and A.lib. My project links to A in the sense that the path to A.lib is added into "additional libraries" path in visual studio (in "linker, general"), and A.lib is added in "linker input" in visual studio. All header and source files are in the same project.

Now, I have B.h and B.cpp. The latter includes B.h that includes A.h, and a function f declared in B.h has its definition in B.cpp that uses a function g declared in A.h.

At build, I have the following error message :

error LNK2019: unresolved external symbol g referenced in function f

and I don't understand why this happens, accounting on the library linking I performed described above.

I added the tag xll because my problem happens in an xll context, and because this issue may be classic in an xll context. For xll people :

  • A.h is XLCALL.h, A.lib is XLCALL32.lib
  • B.h is FRAMEWRK.h and B.cpp is FRAMEWRK.cpp
  • f is for instance _TempActiveRef12 and g is _Excel12 (or f is_Excel12fandgis_Excel12v@16`)
Olórin
  • 3,367
  • 2
  • 22
  • 42

1 Answers1

0

I removed B.cpp and used instead a B.lib furnished as well and removed my linker errors.

Olórin
  • 3,367
  • 2
  • 22
  • 42