Create a user library

This is a discussion on Create a user library within the C Programming forums, part of the General Programming Boards category; Is there a way to create a user library of your self written functions? That you can include your own ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    26

    Question Create a user library

    Is there a way to create a user library of your self written functions? That you can include your own functions, like for ex. #include <string.h>, with #include <my_functions.h> in your projekt?

    mfg

  2. #2
    Information Crocodile
    Join Date
    Dec 2004
    Posts
    204
    Hi Pre? You mean create your own header file?

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Is there a way to create a user library of your self written functions?
    Yes, of course. The easiest way is to just create a header/implementation pair and add it your project. Here is an example. There's nothing special to it unless you want to actually create a static or dynamic library, such as the .lib files that your compiler probably links with behind your back.
    My best code is written with the delete key.

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    Thx for your answer.
    But what does the #ifdef's cause? is that a protection that if you have already included this header file, the prototypes are not included twice?
    And what is reached with extern "C"?

    Yes, the thing with the static or dynamic library is what i really want. I just don't want to load my own written functions in each projekt to the other project-files, I want to use them like you use printf() or whatever.

    mfg

    edit: i found a tutorial how to make static or dynamic libraries with the keywords "static dynamic library" you gave me
    http://users.actcom.co.il/~choo/lupg...libraries.html
    Last edited by mabuhay; 10-25-2005 at 08:30 AM.

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    yessssssssss, it works!

    if someone needs ini functions to store data in a *.ini-file like settings etc. here you can download my library (C-Funktionen -> ini_* -> my_ini.zip). Also a demo-programm is available.
    Last edited by mabuhay; 10-27-2005 at 12:18 PM.

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Too bad you don't have an English language version of that web site I have no clue what it says.

  7. #7
    ---
    Join Date
    May 2004
    Posts
    1,379
    babelfish it

  8. #8
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    hmmyes, I still thought about a translaion, but it would be to hard to translate everything on my own.

    Today i added some descriptions of the functions. I think, if you know something about ini-Files, you can find out how they are working.

    If there ist big necessary for an english translation, i could make one if i've finished all the descriptions of the functions.

    is there an easy way i could use to make a language-file for the functions? maybe if i #define MY_INI_LANG_E it would show the english messages of the functions if they are enabled?

    just ask me here for help, if you need...

    or learn german

    mfg
    Last edited by mabuhay; 10-28-2005 at 03:25 PM.

  9. #9
    Registered User
    Join Date
    Oct 2005
    Posts
    26
    now I opened a forum, with an english section.-> Forum
    Feel free to post all your questions about the homepage there. I will answer as good as i can.
    Last edited by mabuhay; 11-03-2005 at 02:45 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. create a static library from C++ and C code
    By lehe in forum C++ Programming
    Replies: 1
    Last Post: 04-06-2009, 07:28 PM
  2. Using Variable To Read Structure
    By CyBeR in forum C++ Programming
    Replies: 35
    Last Post: 10-24-2007, 02:29 PM
  3. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 02:53 PM
  4. better c string functions
    By samps005 in forum C Programming
    Replies: 8
    Last Post: 11-04-2003, 12:28 PM
  5. comparing user input
    By lambs4 in forum C Programming
    Replies: 5
    Last Post: 12-15-2002, 09:28 AM

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