PDA

Click to See Complete Forum and Search --> : argp.h


ChimpFace9000
Dec 22nd, 2001, 10:07 PM
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.

parksie
Dec 23rd, 2001, 05:11 AM
What's the header for?

ChimpFace9000
Dec 23rd, 2001, 12:09 PM
The argp_parser function. Its an advanced argument parser.

parksie
Dec 23rd, 2001, 12:57 PM
I never heard of it.

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

http://cvs.parisc-linux.org/obsolete/glibc/argp/

ChimpFace9000
Dec 23rd, 2001, 01:05 PM
Is the entire libc obsolete?

parksie
Dec 23rd, 2001, 01:08 PM
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 :)

ChimpFace9000
Dec 23rd, 2001, 01:14 PM
Nope im running windows here.

parksie
Dec 23rd, 2001, 01:16 PM
:(

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

www.cygwin.com

ChimpFace9000
Dec 23rd, 2001, 02:49 PM
Nope i tried it already. Ming-W doesnt either. Are there any really good C compilers for windows?

parksie
Dec 23rd, 2001, 02:53 PM
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.

ChimpFace9000
Dec 23rd, 2001, 04:38 PM
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.

parksie
Dec 23rd, 2001, 04:41 PM
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.

ChimpFace9000
Dec 23rd, 2001, 04:55 PM
All C++ compilers "do" C. C++ is made from C. But the executables come out huge. Thats why i want a c compiler only.

parksie
Dec 23rd, 2001, 05:05 PM
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.

ChimpFace9000
Dec 23rd, 2001, 05:38 PM
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.

parksie
Dec 24th, 2001, 06:35 AM
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.

ChimpFace9000
Dec 24th, 2001, 11:11 AM
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.