By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

problem linking dll in C++

P: n/a
Hello guys, I would appreciate it if you C++ Gurus could
help me out a little here.

I downloaded some source code from online and I can't compile
it because it requires a .dll file. The author did include the
source code for the .dll file as well.

I'm using Visual C++ so I clicked New -> Win32 Dynamic Link Library.
Then I made a new c/c++ header file and I copied and paste the code
into it. And I also made a new c/c++ source file and copied and paste
the code into it.
After all that I clicked compile then build. It worked fine and it
generated the .dll file, but it didn't generate the .lib file as well

I don't understand how can I link the main program to the .dll file
if it doesn't have the .lib file?

How do I generate the .lib file? and how to link a program to a .dll
file? where should I put the .dll file in and what do I click in V
C++?

I would really really appreciate your feedbacks.
Thanks so much guys.

Brian.
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
FYI: the microsoft news server is MSnews.microsoft.com (notice the MS before
news.microsoft.com).

news://msnews.microsoft.com/microsoft.public.vc.*

HTH,
Jeremy
"John Harrison" <jo*************@hotmail.com> wrote in message
news:bh************@ID-196037.news.uni-berlin.de...

"Brian Su" <ha******@streamyx.com> wrote in message
news:h7********************************@4ax.com...
Hello guys, I would appreciate it if you C++ Gurus could
help me out a little here.

I downloaded some source code from online and I can't compile
it because it requires a .dll file. The author did include the
source code for the .dll file as well.

I'm using Visual C++ so I clicked New -> Win32 Dynamic Link Library.
Then I made a new c/c++ header file and I copied and paste the code
into it. And I also made a new c/c++ source file and copied and paste
the code into it.
After all that I clicked compile then build. It worked fine and it
generated the .dll file, but it didn't generate the .lib file as well

I don't understand how can I link the main program to the .dll file
if it doesn't have the .lib file?

How do I generate the .lib file? and how to link a program to a .dll
file? where should I put the .dll file in and what do I click in V
C++?

I would really really appreciate your feedbacks.
Thanks so much guys.

Brian.
Your question is a 'How do I operate my compiler?' type question. This

group is for question about the C++ language, which has nothing to say about dlls, or linking.

Try a group that is about your compiler,
news:microsoft.public.vc.ide_general for instance. You can find this on the news://news.microsoft.com server, if your own news server doesn't carry it.
john


Jul 19 '05 #2

P: n/a

"Jeremy Cowles" <jeremy.cowles[nosp@m]asifl.com> wrote in message
news:e7********************@twister.tampabay.rr.co m...
FYI: the microsoft news server is MSnews.microsoft.com (notice the MS before news.microsoft.com).

news://msnews.microsoft.com/microsoft.public.vc.*

HTH,
Jeremy


Actually both names work (at least the last time I tried they did).

john
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.