Exe's and Dll's in windows require an entry point if they contain executable code, see this MSDN page for DllMain:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx
For an exe it tends to be main() for a console app, or WinMain for a pure win32 API app.
Since your DLL wants a main() I assume you must have created an EXE console project and then changed it to a DLL later.
To resolve your issue you need to create the entry point function which is normally DllMain, but in your case is actually main. The entry point of your DLL can do nothing (i.e empty/stub function), which will allow it to link, and be loaded/unloaded by the OS, which then allows your client(s) to call your code :).