newbie critical question

Discussion in 'C++' started by wlmparker@gmail.com, Feb 15, 2007.

  1. Guest

    hi
    i have tried to post here before but i think my post was not
    successful for some reason, or you might be reading this post again,
    oh well.
    i got a couple a noob questions about c++, i would like to have'em
    answered.
    i have been workin with c++ for a while just for studying purposes ,
    but i was always
    using the standard provided api until i decided to go further and use
    extrenal libraries.
    what are external libraries? are they .dll files or .a files ?
    how do i refer to them in my programs? where and when are they used in
    the build process and how are they found by the compiler or linker?

    i still got a couple a noob questions, but i'll leave them until next
    time hoping that a reply to this post
    might answer some of them in advance.
    thanks
    --
    Willy
     
    , Feb 15, 2007
    #1
    1. Advertising

  2. wrote:
    > hi
    > i have tried to post here before but i think my post was not
    > successful for some reason, or you might be reading this post again,
    > oh well.
    > i got a couple a noob questions about c++, i would like to have'em
    > answered.
    > i have been workin with c++ for a while just for studying purposes ,
    > but i was always
    > using the standard provided api until i decided to go further and use
    > extrenal libraries.
    > what are external libraries? are they .dll files or .a files ?
    > how do i refer to them in my programs? where and when are they used in
    > the build process and how are they found by the compiler or linker?


    The answer to all of these question is, it depends.

    It depends on what compiler you are using and it depends on what
    operating system you are programming for. The one thing it doesn't
    depend on is C++ which says nothing at all about libraries.

    So to answer you question you need to say what compiler and what O/S you
    are using. And then you need to ask on an appropriate newsgroup, not
    here since these are not C++ questions.

    john
     
    John Harrison, Feb 15, 2007
    #2
    1. Advertising

  3. Guest

    On Feb 15, 7:47 pm, John Harrison <> wrote:
    > wrote:
    > > hi
    > > i have tried to post here before but i think my post was not
    > > successful for some reason, or you might be reading this post again,
    > > oh well.
    > > i got a couple a noob questions about c++, i would like to have'em
    > > answered.
    > > i have been workin with c++ for a while just for studying purposes ,
    > > but i was always
    > > using the standard provided api until i decided to go further and use
    > > extrenal libraries.
    > > what are external libraries? are they .dll files or .a files ?
    > > how do i refer to them in my programs? where and when are they used in
    > > the build process and how are they found by the compiler or linker?

    >
    > The answer to all of these question is, it depends.
    >
    > It depends on what compiler you are using and it depends on what
    > operating system you are programming for. The one thing it doesn't
    > depend on is C++ which says nothing at all about libraries.
    >
    > So to answer you question you need to say what compiler and what O/S you
    > are using. And then you need to ask on an appropriate newsgroup, not
    > here since these are not C++ questions.
    >
    > john


    ok man take it easy i told you i was a newbie, sorry anyway !
    im using gcc compiler suite on win32 , i suppose there is no newsgroup
    for gcc is there ?
    i have ran some small examples but i'm always getting undefined
    reference to .. errors in the link stage,
     
    , Feb 15, 2007
    #3
  4. red floyd Guest

    wrote:
    > [redacted]
    >
    > ok man take it easy i told you i was a newbie, sorry anyway !
    > im using gcc compiler suite on win32 , i suppose there is no newsgroup
    > for gcc is there ?
    > i have ran some small examples but i'm always getting undefined
    > reference to .. errors in the link stage,
    >


    gnu.g++.help

    Since you're a newbie, may I recommend that you read the comp.lang.c++
    FAQ at http://www.parashift.com/c -faq-lite ; in particular the posting
    guidelines http://www.parashift.com/c -faq-lite/how-to-post.html ?

    This will help you understand what is and isn't topical here, where you
    might look for help for off-topic stuff, and keep you from getting
    flamed, which by the way, John did not do, he simply told you it was OT
    here.
     
    red floyd, Feb 15, 2007
    #4
  5. j0rd4n Guest

    On Feb 15, 11:35 am, wrote:
    > hi
    > i have tried to post here before but i think my post was not
    > successful for some reason, or you might be reading this post again,
    > oh well.
    > i got a couple a noob questions about c++, i would like to have'em
    > answered.
    > i have been workin with c++ for a while just for studying purposes ,
    > but i was always
    > using the standard provided api until i decided to go further and use
    > extrenal libraries.
    > what are external libraries? are they .dll files or .a files ?
    > how do i refer to them in my programs? where and when are they used in
    > the build process and how are they found by the compiler or linker?
    >
    > i still got a couple a noob questions, but i'll leave them until next
    > time hoping that a reply to this post
    > might answer some of them in advance.
    > thanks
    > --
    > Willy


    Will,

    The libraries used by C++ depend on the OS you are working on.
    Libraries are pre-compiled functions that you can connect to at
    runtime to perform some task. For instance, let's say you write some
    generic code that can be used in multiple contexts and applications.
    You could compile that code into a library and link to that library in
    other applications.

    There are two primary components to libraries (a library file and a
    binary file). If you are in Windows the library file is a .lib and
    the binary file is a .dll. If you are in Unix/Linux the library file
    is a .a file and the binary file is a .so file.

    This is how it works. The .lib/.a file is needed at link time so that
    your linker can find the needed references/symbols to link the object
    files. Let's say you want to use a library in your code that exposes
    the method "calculateDistance". You need to include the path to the
    library when linking so that it can find a reference to the
    "calculateDistance" method (because how else would it know?). At
    runtime your application will then try to find the binary for the
    library .dll/.so so that it can actually run the code you reference in
    the program.

    This just scratches the surface on libraries. I recommend searching
    MSDN or google for more references. Let me know if you have anymore
    questions.

    j0rd4n
     
    j0rd4n, Feb 15, 2007
    #5
    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. Matt North
    Replies:
    0
    Views:
    454
    Matt North
    Oct 20, 2003
  2. Replies:
    0
    Views:
    691
  3. Andy
    Replies:
    0
    Views:
    318
  4. Replies:
    2
    Views:
    295
    W. J. La Cholter
    Feb 16, 2007
  5. aeromarine
    Replies:
    15
    Views:
    1,507
    Martin
    Feb 18, 2008
Loading...

Share This Page