problem linking dll in C++

Discussion in 'C++' started by Brian Su, Aug 18, 2003.

  1. Brian Su

    Brian Su Guest

    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.
    Brian Su, Aug 18, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:bhqf4u$1vk4u$-berlin.de...
    >
    > "Brian Su" <> wrote in message
    > news:...
    > > 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
    >
    >
    >
    Jeremy Cowles, Aug 18, 2003
    #2
    1. Advertising

  3. "Jeremy Cowles" <jeremy.cowles[nosp@m]asifl.com> wrote in message
    news:e750b.52430$...
    > 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
    John Harrison, Aug 18, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    not linking msvcr70.dll

    Guest, Aug 11, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    955
    Guest
    Aug 11, 2004
  2. Anushi
    Replies:
    5
    Views:
    8,687
  3. Sam Tiny
    Replies:
    2
    Views:
    1,201
    Sam Tiny
    Mar 16, 2005
  4. Replies:
    1
    Views:
    1,637
    Jack Klein
    May 30, 2005
  5. H. Simpson
    Replies:
    4
    Views:
    258
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page