how to import .net dll libraries in project
-
wrote on 25 Nov 2019, 15:57 last edited by
Hi,
i need to inlcude dll files that usually are used with Visual C++ or c++/cli or similiar, these dll comes with ".tlb" files, and i tried to include these, but i get an error. I wrote in my include.h file:
#import "mydll.tlb" no_namespace
and i got following error message:
mydll.tlb:1:1: error: unknown type name 'MSFT'
why can t read and import .tlb file?? Anyone has same issue?
Ty
-
wrote on 25 Nov 2019, 18:24 last edited by
Hi, make sure you're using an MSVC compiler (and not the MinGW)
Try putting the #import statement in one of your .cpp files instead of an .h file. Also try it without theno_namespace
suffix -
wrote on 26 Nov 2019, 09:42 last edited by
Also make sure you are compiling with the
/clr
option on
1/3