Question

I implemented a C++ dll that compiled successfully. The project contains a header and cpp file. The cpp file includes several third party headers (Cplex mainly).

Once the dll was created: I then attempted to reference the dll in visual studio and it didn't work. In the console application, I used the tlbimp.exe and I encountered the error message:

<AssemblyFileName.dll> is not a valid type library.

I then used dependency walker and it showed the error message:

"MSVCR90.DLL was not found".

I am surely missing something and would appreciate if you can point what the solution could be?

Was it helpful?

Solution

There are two issues here, one is that not all native dlls are also type libraries, only COM ones.

the second error is more like you do not have a Visual C++ runtime available, are you building the C++ dll on the same box of trying to use it?

for non COMN dlls, instead of import the type library you could use DLLImport approach.

OTHER TIPS

If you donot have Visual Studio 2008 you will get the error MSVCR90.dll. You can just install the Visual Studio 2008 runtime and then you will not have any dependecy errors related to MSVCR90.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top