- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am building a static library (A) by dynamically linking to a Dll. A subroutine called SET_VENDOR_KEY from the Dll is being called from a subroutine in the static library A. Static library A builds without errors.
When I build my application by statically linking to A, I get the following error:
error LNK2019: unresolved external symbol _SET_VENDOR_KEY@8 referenced in function _OLGAS
Question:
Why do I get the error only when I build the C++ dll and not when I build the static library A?
Is this due to incorrect calling conventions?
Any help is welcome.
Ash
When I build my application by statically linking to A, I get the following error:
error LNK2019: unresolved external symbol _SET_VENDOR_KEY@8 referenced in function _OLGAS
Question:
Why do I get the error only when I build the C++ dll and not when I build the static library A?
Is this due to incorrect calling conventions?
Any help is welcome.
Ash
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's a calling convention mismatch. But note that a static library does not link to anything, so you would not see errors until the executable links.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page