Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call C++ library in C# [closed]

Tags:

I have a lot of libraries written in C++. I want to call these libraries from C#, however, I have met many problems. I want to know if there is a book or guideline to tell me how to do that.

like image 221
Yigang Wu Avatar asked Feb 22 '09 11:02

Yigang Wu


People also ask

What is C type library in C?

The ctype. h header file of the C Standard Library declares several functions that are useful for testing and mapping characters. All the functions accepts int as a parameter, whose value must be EOF or representable as an unsigned char.

Can I use a CPP library in C?

If the C++ compiler provides its own versions of the C headers, the versions of those headers used by the C compiler must be compatible. Oracle Developer Studio C and C++ compilers use compatible headers, and use the same C runtime library. They are fully compatible.

What is library function in C with example?

C Standard library functions or simply C Library functions are inbuilt functions in C programming. The prototype and data definitions of these functions are present in their respective header files. To use these functions we need to include the header file in our program.

Is there library in C?

A library in C is a collection of header files, exposed for use by other programs. The library therefore consists of an interface expressed in a . h file (named the "header") and an implementation expressed in a .


1 Answers

  1. DllImport - http://msdn.microsoft.com/en-us/library/aa984739(VS.71).aspx
  2. Wrapper class - http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/67cc9eea-a4fe-48bd-b8d5-f3c8051ba896
like image 168
Michał Ziober Avatar answered Oct 09 '22 19:10

Michał Ziober