473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem linking dll in C++

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
2 3650
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: oguz mut | last post by:
hi, I have a linking problem while living in the following configuration: . windows 2000 . cygwin . g++ (GCC) 3.3.1 (cygming special) I work with the following 3 files (trivial.hpp,...
7
by: Ittay Dror | last post by:
Hi I have this peculiar situation. I have a library of utility classes, which I use to compile a binary. I want to reimplement a method in class. The class is only a collection of static...
6
by: DJ.precario | last post by:
Hi everyone, I am having a linking problem, and I'd appreciate any help with this. The code showing the problem: class base { public: virtual void f(int); };
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
4
by: Kevin Wan | last post by:
Hi, I have encountered a linking problem while using g++ to link our product. There are Fortran, C, C++ code in our product. The error listed below: /usr/bin/ld: final link failed: Bad value...
17
by: Mitas Nikos | last post by:
I am trying to use the library conio2 and though I have managed with a few relatively simple examples when i try to compile a program which conio's function clrscr is not in main() i get an error...
4
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
1
by: buchalino | last post by:
Hi Guys, Please can someone help me, I am having a linking problem . I am writing a socket program, the problem is just the linking . I am using VC++ In the process of the problem, I...
1
by: fsmountain | last post by:
Hi guys, I am trying to compile VTK5.0 with Qt GUI Support in Windows 2000 that has Qt Open-Sourced 4.1.2 and CMake 2.4.2 installed. After QVTK is enabled in CMake, configuring it will prompt...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.