Skip to main content
GameDev.net gamedev.net
🔒 Locked

retarded question: how to build a DLL in vs2005

Started by playmesumch00ns Feb 22, 2006 at 4:08 AM 3 replies 3.8k views
Original Post
playmesumch00ns
playmesumch00ns
Ok I'm probably going to get flamed for this, but I honestly can't figure this out or find the answer in the docs. How do I successfully build a DLL in VS 2005? In older versions I could just select a DLL template from the new project wizard, but that option seems top have gone in the latest version. So I selected "Win32 application" instead, and tried setting everything to 'DLL' and "No entry point' etc, but the linker still fails telling me it can't find _tmain! There's got to be a simple way of doing this, right?
b2b3
b2b3
Create new Win32 Project, then select DLL (and you may want to setect Empty project too). You do not need to change any other settings in project.
This works for me. For example I tried this (only one file in solution):
extern "C" {    __declspec(dllexport) int foo(int x) { return 5 * x; }}
Samsonite
Samsonite
I could not find "pure dll" but I found both MFC dll and MFC smart device dll.

I have never worked with .dll s but thats the ones I found.

Hope it helps a little [smile]
Hope I was helpful. And thank you if you were!
C J W
C J W
Create a normal, empty project but then in the Project properties after you have created it select DLL.

Properties->General->Configuration Type
ToDoList.GrowthRate = WorkRate*2, it's more efficient to not work.
playmesumch00ns
playmesumch00ns
Thanks for the help everyone.

Okay, retarded question part 2: I got the DLL to build okay... but where's it put my .lib file?

In the configuration it says $(TargetDir)\$(TargetName).lib by default, but I have no idea where this is!

If I change it to $(OutDir)\$(ProjectName).lib to match the DLL, I still get no .lib file!

Any ideas?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.