Hi,
I don't have source code with me ,then how can I generate native code using
compilers of MS (MC++ in VS2002/3 - C++/CLI in VS2005).I have the lib file
and header files ( declared the methods).Let me know using this how can I
call those functions defined in lib.
Exepceting the proceudre in detail or step by step.
> >I have a library file (.lib) which was developed in c++, I need to use this
> > lib file into .net
[quoted text clipped - 13 lines]
> Regards.
> Will
Ashot Geodakov - 09 Jan 2007 21:56 GMT
1. In Visual Studio:
File -> New -> Project
2. In New Project dialog:
Select Visual C++ (CLR) project type, Class Library template -> OK
3. In VS Solution Explorer:
Right-click on project name -> Add -> Existing item(s) -> Select your header
file and include in in the project.
4. Right-click on project name -> Properties.
5. In Project Properties dialog:
Add your .lib to the list of inputs for the linker.
6. In the Solution Explorer you'll notice a header and a source file for a
template ref class created for you by VS.
Add public methods to this class that call into your lib. Compile the
assembly.
7. Add a reference to this assembly to any .Net project and call into the
new class' methods, which will call into your lib.
> Hi,
> I don't have source code with me ,then how can I generate native code
[quoted text clipped - 4 lines]
>
> Exepceting the proceudre in detail or step by step.
William DePalo [MVP VC++] - 09 Jan 2007 23:32 GMT
> I don't have source code with me ,then how can I generate native code
> using
> compilers of MS (MC++ in VS2002/3 - C++/CLI in VS2005).
Well, there is no magic. You can write code to call the functions in the
library. You compile your code and link it with the library.
Regards,
Will