Thread: how to make a library ??

  1. #1
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186

    how to make a library ??

    Hi, after i created my matrices multiplication class, it works just perfect
    but i wanna create my own matrix library that contains this class. So how to make my own :
    Code:
    #include <matrix>
    ?? so any C++ programmer can download it and have its functionality, specially that C++ doesn't have high level built-in types like matrices as Bjarne stated


    And i use Microsoft Visual Studio 2005 professional edition

    this is the program who is intersted in it
    http://www.geocities.com/achillis_sword/program.zip


    techniques i used:
    • Object-oriented programming
    • Dynamic array
    • Operating overloading (directly multiplying two objects)


    and some other stuff related OO
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  2. #2
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    posting the actual exe doesn't help much! ideally if you want your library to be used as widely as possible simply distribute the source, with build instructions. Assuming it's standard C++ this will allow anyone who wants to build it themselves.

    If you don't want to distribute the source, change the project type (under project properties) to "static library" and rebuild. You'll then have a .lib file that people can link to. You'll still need to package the header files with though.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #3
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    i made a .lib file of it, by compiling the header and the implementation but when i paste the library in "lib" folder in Ms Visual Studio 2005, and i include it in the code, it doesnt work
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  4. #4
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    "it doesn't work"? care to be a bit more specific?

    as in it doesn't compile? it doesn't link? it runs but send nasty emails to your granny?

    you need to tell you app that you're using the library
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's an import library?
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 06-19-2009, 05:00 PM
  2. How to make a Packet sniffer/filter?
    By shown in forum C++ Programming
    Replies: 2
    Last Post: 02-22-2009, 09:51 PM
  3. Replies: 1
    Last Post: 12-03-2008, 03:10 AM
  4. howto make a static library?
    By mart_man00 in forum C Programming
    Replies: 2
    Last Post: 07-19-2003, 11:10 PM
  5. 'functions' in make?
    By mart_man00 in forum C Programming
    Replies: 1
    Last Post: 06-21-2003, 02:16 PM