Results 1 to 18 of 18

Thread: argp.h

  1. #1
    ChimpFace9000
    Guest

    Post argp.h

    Does anyone know of a c compiler that has the argp.h file? Since its mainly for unix i thought DJGPP would, but it didnt.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    What's the header for?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    ChimpFace9000
    Guest
    The argp_parser function. Its an advanced argument parser.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    I never heard of it.

    You mean parsing things like:
    Code:
    parksie@vbworld.com$ ls --color -FRa
    I found this though, but make of it what you will...

    http://cvs.parisc-linux.org/obsolete/glibc/argp/
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    ChimpFace9000
    Guest
    Is the entire libc obsolete?

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    Nope, that's an obsolete branch of the libc code for PA-RISC systems.

    It's the only place I could find that had any source whatsoever. If you have a Linux installation somewhere you might have the source in it
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    ChimpFace9000
    Guest
    Nope im running windows here.

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169


    Umm...maybe Cygwin has it? I have it installed but not any of the source code.

    www.cygwin.com
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9
    ChimpFace9000
    Guest
    Nope i tried it already. Ming-W doesnt either. Are there any really good C compilers for windows?

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    Well, gcc if you can get Cygwin working

    2.95 works fine under mine, but I've been having difficulty getting GCC3 in - it compiles but can't install, so you'd have to set everything up manually.

    Visual C++ generates the best code out of that and Borland FCLT 5.5, but I haven't had chance to peruse gcc3's windows output having not got it working yet

    It was fine under linux though.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    ChimpFace9000
    Guest
    GCC for windows or DOS just plain sucks. (I want linux so bad!) Visual C++ isnt C, so it makes huge executables. Same with BC 5.5.

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by ChimpFace9000
    GCC for windows or DOS just plain sucks. (I want linux so bad!) Visual C++ isnt C, so it makes huge executables. Same with BC 5.5.
    It does C as well.

    Use files with a .c extension.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    ChimpFace9000
    Guest
    All C++ compilers "do" C. C++ is made from C. But the executables come out huge. Thats why i want a c compiler only.

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    Hmmm...some numbers for MSVC (release mode):

    Static CRT: 27K
    DLL CRT: 2.5K

    I couldn't get it less than 2.5 in C mode even when messing with the CRT stuff, although I managed to link in some separately-compiled segments of the CRT (like printf).

    However, the problem isn't with the generated code, it's with the libraries it uses.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15
    ChimpFace9000
    Guest
    Ok whats static CRT and whats dll CRT. And 27kb is still big. LCC can get it down to like 5. And thats with debug info i think.

  16. #16
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    CRT = C RunTime library

    If you link it into your program, that's static. If it uses msvcrt.dll then that's dynamic (and considering msvcrt.dll HAS to be on every system, that's not really a problem).

    Like I say, it's a problem with the layout of the libraries, or perhaps the linker. 27KB was when it brought all the file i/o stuff in which is a size killer for both C and C++.

    Although, I got a printf equivalent by using wsprintf, GetStdHandle, and WriteFile. It works perfectly, and takes almost no space in the executable.

    I think I get round most of these problems by just hacking out the bits of the CRT source I want and using the rest from kernel32.dll.

    I will admit though, that a pure C compiler can get it down further, because the library doesn't need to support calling all the static initialisers.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  17. #17
    ChimpFace9000
    Guest
    I guess my only answer is to switch to Linux. I have to get my own computer first. So i guess ill just use DJGPP while im on windows.

  18. #18
    New Member
    Join Date
    May 12
    Posts
    1

    Re: argp.h

    hi.. i have a question maybe you can help me... how can i call a .txt file with the argp library, being the .txt file "archivo_carreras" and "archivo_estudiantes" These files are input and "archivo salida" is a .txt file too but it is the output of the program

    i want to find something like this example:

    ./pre -F<archivo-estudiantes> -U<archivo-carreras> -o<archivo-salida>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •