tags:

views:

723

answers:

3

How do I compile a .cpp source file into a .dll?

A: 

You have to compile cpp files into .obj files, then link them to produce a .dll.

John Saunders
How can i link it . I am new to this field. Please guide me to find out
Sakthivel
+1  A: 

A dll file is a library file, which is composed of many object files. This means you need to compile your .cpp file then combine it with any other files you need into the .dll.

Here's a tutorial I found with a quick google: http://www.icynorth.com/development/createdlltutorial.html

samoz
A: 

If you are compiling from the command line and have everything else right, then you need to specify /LD option.

If you are using Visual Studio, then you would need to create a DLL project right at the beginning.

You can find more details here: http://msdn.microsoft.com/en-us/library/ms235636(VS.80).aspx

vivekian2