Jump to content

C Sharp DLL Question

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
I've got a DLL that I'm coding, is there a way when I compile it to have the C# Code generate a .LIB File for my DLL ?

For Example Right now When I compile my code I get these two Files
DummyDLL.dll
DummyDLL.pbd

I'd like the Compiler to also create
DummyDLL.lib

and if possible
DummyDLL.h
Though I can generate a dummy.h file when I import the dummydll.tlb that's created with RegAsm.exe

#2
Davide

Davide

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 506 posts
Are you using C# with .NET? Or just plain C#? Because I don't see why you want a .LIB file. Class Libraries only have the .DLL extension in .NET as far as I know.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics

#3
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
The System that will be consuming the DLL is using VC6 C++ and I keep reading the best way to consume a DLL you'll need a .LIB File.

#4
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
you can get a static wrapper here
http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/d1fc2aac-4ac7-4c11-83c0-d67b25d1b367/
it is also possible to generate one with visual studio
http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/

Edited by gokuajmes, 18 June 2010 - 10:18 PM.
added extra links