What kind of link do you need? You can use your C++ library in C# project, but using C# library in C++ project is much more difficult so many even think it is impossible. Second way is quite advanced and I hope you can avoid it; first learn a first one and later ask a question on the second one if interested.
So, how to use C++ code in C#? Of course, you need to make you C++ code a DLL. If does not matter of implementation uses static library, but your C++ project should create DLL and expose some functions by exporting them. You should use primitive types or structures, but not C++ classes. Exposing C++ classes the way it can be used by .NET is also possible, but this is advanced topic, you can ask about it separately.
From this moment, you can link the methods of your native DLL in your C# project. In each case, you will need the name of DLL file and the signature of your exported methods. The technique is called
P/Invoke.
You need to translate C++ signature in C# signature using available type mapping implemented in C# using default
Marshalling. In more difficult cases, you need to use
[MarshalAs]
attribute; in even more difficult cases you might need to create custom marshaling.
Learn about P/Invoke:
http://en.wikipedia.org/wiki/PInvoke[
^],
http://msdn.microsoft.com/en-us/library/Aa712982[
^].
Read this CodeProject article:
Essential P/Invoke[
^].
—SA