🔒 Locked
DLLs
Advertisement
Original Post
Hi,
I have created DLLs with Visual C++ 6 and the compiler generates both .dll and .lib while so that we can add it either at run-time or compile time.
But ... I have started using Visual Studio .NET now ... and when I create a DLL and compile it, it only makes a .dll file ... no .lib file.
Is there something I have to do to get the .lib file with the DLL?
Thanks!
I can survive anything ... even NUKES!!!
The Lion King
.NET does things differently. For starters, everything is contained in "assemblies", which are either EXE files or DLL files. If you want to use a DLL in a .NET project, you don''t link with a library, you reference an assembly (you can only reference DLL assemblies in this way) and the IDE extracts all the classes and functions from the assembly. You can then begin using them.
Now, are you using managed extensions? It sounds like you don''t want to, because if you''re still writing unmanaged C++ code, you''ll still want that library file. However managed extensions tell MSVC not to create it, because it thinks you''re writing a .NET application where only the DLL would be needed.
Now, are you using managed extensions? It sounds like you don''t want to, because if you''re still writing unmanaged C++ code, you''ll still want that library file. However managed extensions tell MSVC not to create it, because it thinks you''re writing a .NET application where only the DLL would be needed.
if you start a normal C++ Win32 project, change it to a DLL and bash compile it will produce both a .lib and a .dll file
No ... I am not using .NET ...
so ... you mean that I cannot use dlls created with Visual Studio .NET during compile time ...
so ... you mean that I cannot use dlls created with Visual Studio .NET during compile time ...
quote:
Original post by _the_phantom_
if you start a normal C++ Win32 project, change it to a DLL and bash compile it will produce both a .lib and a .dll file
It works in Visual C++ 6 but not in Visual Studio .NET 2003 ... that is what I am asking ... how do I make one ?
No ... I am using the .def file ... does that have to do something with it :?
Thanks Zipster ... I haven''t tried that ... I will when I will reach home
Thanks Zipster ... I haven''t tried that ... I will when I will reach home
This one is subtle...you must export something in order to generate your .lib and .exp files in VS .NET. This was not a requirement in VS 6.0. www.codeproject.com has tons of examples of how to use Dll''s exporting classes and functions.
I''m assuming you are writing C/C++ correct. I noticed that there were some posts talking about managed code and the such.
the .def file I think is used for exporting isn''t it ... anyway I haven''t tried the other option ... I will try it when I will get home.
And like I mentioned before I am using just plain C++ no managed stuff
And like I mentioned before I am using just plain C++ no managed stuff
Thanks guys ... problem solved
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement