AndosBerry
AndosBerry

Reputation: 145

Can I create/use static libraries in C# for Silverlight windows phone project?

Is there a possibility to use static (.lib) libraries with C# silverlight project? I have searched all over the internet and found no proper solution for using static libraries.

Upvotes: 1

Views: 350

Answers (1)

user1610015
user1610015

Reputation: 6678

Static libraries are C++ libraries. You can't use them directly from C# but there are ways to do interop:

  1. Wrap the C++ classes in a C++/CLI assembly
  2. If you can modify the static library code, make the C++ classes COM classes (using ATL) and let the CLR do the wrapping

Upvotes: 2

Related Questions