troubleshooting Question

how to create a dll with visual studio

Avatar of calvinrsmith
calvinrsmith asked on
ProgrammingEditors IDEs
3 Comments1 Solution418 ViewsLast Modified:
I'm trying to create a .dll with visual studio 6 and can't seem to figure out the compile / link options.  I have to compile in a command prompt so I can't just tell the wizard to make a dll.

Here is how I compile:
cl /Yd /Zi /Tpa.c /Foa.obj

and here is how I link:
link/nologo /out:a.dll a.obj wsock32.lib winmm.lib

when I compile all is fine.
when I link I get:
  Creating library a.lib and object a.exp
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
a.dll : fatal error LNK1120: 1 unresolved externals

What do I need to add / change to make it make a dll?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros