I have an application that has been worked on for several decades and I was provided .h and .a files. My program is mainly in C/C++ and when I try to link to these .a files, I get:
Error LINK2019: unresolved external symbol referenced un function
Fatal error LINK1136: invalid or corrupt file.
I'm using Visual Studio 2022 on Windows.
All my other static library files are .libs, but this is an .a file. Is there a way to link to .a static library files?
My .vcxproj files looks like this:
<Link>
<AdditionalDependancies>...;NewLibrary.a;$(AdditionalDependancies)</AdditionalDependancies>
....
</Link>
This is my .props file:
<AdditionalIncludeDirectories>...$(THIRDPARTYLIB)/NewLibraries</AdditionalIncludeDirectories>
<AdditionalLibraryDirectories>...$(THIRDPARTYLIB)/NewLibraries</AdditionalLibraryDirectories>
.astatic libraries are typically the format that linux or MinGW libraries will come in, so there's pretty low chance that the Microsoft C++ compiler will support the .a file.