how do i make my own libraries

This is a discussion on how do i make my own libraries within the C++ Programming forums, part of the General Programming Boards category; im useing dev-c++ 5 beta 7 i want to make my own libraries im new to prgraming and i experamented ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    4

    how do i make my own libraries

    im useing dev-c++ 5 beta 7

    i want to make my own libraries

    im new to prgraming and i experamented a little with no luck what so ever if any one could point in the right direction
    that would be great

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    33
    try and write a simple code like helloworld:

    #include <iostream>

    int main()

    {

    cout<<"HelloWorld";

    return 0

    }

    and keep messing around with your compiler. if you would like, start readin some c++ tutorial it might help you out of what you looking for.


    http://www.cprogramming.com/tutorial.html
    Snoop

  3. #3
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078

    Re: how do i make my own libraries

    Originally posted by oldmancan
    im useing dev-c++ 5 beta 7

    i want to make my own libraries

    im new to prgraming and i experamented a little with no luck what so ever if any one could point in the right direction
    that would be great
    Static Link Libraries or Dynamic Link Libraries (.lib or .dll)

    A Static Link Library is even easier than making an executable because there is not even a link phase. Just go to file, new project, static library, and then put whatever you want in there.

  4. #4
    Registered User
    Join Date
    Jan 2003
    Posts
    4

    how to use

    after i put somthing simple in the lib how would i use the code inside another project

  5. #5
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    #include the same headers and add the library in Project Options (Add Library or Object). You'll select the .a file (.lib is just a different extension).

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    4

    thanks

    thanks a lot

    i got a simple
    Code:
    void add(int a, int b)
    Code:
    {
    Code:
    return a + b;
    Code:
    }
    to work now i'll try to do somthing usefull
    with this

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 10:53 AM
  2. Question about atheists
    By gcn_zelda in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 08-11-2003, 11:50 AM
  3. 'functions' in make?
    By mart_man00 in forum C Programming
    Replies: 1
    Last Post: 06-21-2003, 02:16 PM
  4. Replies: 6
    Last Post: 04-20-2002, 06:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21