Compiling with gcc, libraries missing? workarounds?y

Compiling with gcc, libraries missing? workarounds?y

Post by J. Curt » Fri, 07 Nov 1997 04:00:00


A friend of mine had the same problem and figured out that
the libraries need to be linked for the compiler to work.
The documentation does not say to do this, but it works.
Hope this helps!


> Hello people,

> I do not have any idea of UNIX, but I have to compile a c source code to
> use it as a cgi script.

> There's what I tried:

> webfactory: {11} % gcc -o test.cgi test.c cgihtml.a
> test.c:3: process.h: No such file or directory
> test.c:4: dos.h: No such file or directory
> test.c:5: io.h: No such file or directory
> webfactory: {12} %

> cgihtml.a is a library I will have to use. It seems to me as if there
> were some include files missing. I checked out the whole system but was
> unable to find them. Transferring the files from my local computer (Win
> NT-based) causes some more error messages.

> Programs (better source codes) using just stdio.h work fine.
> Someone told me not to use these missing include files to check out
> which functions are not supported. I did so and found that sleep() and
> getpid() need those files.

> (I need them for file I/O. In my manual, it is suggested to create a
> "lockfile" to prevent multiple write accesses to a file at a time; i.e.
> the program should check wheter this file exists. If so, it should wait
> (--> sleep() ) a few seconds and retry. In the given example, after the
> lockfile is created the pid is written into it, claiming that would be
> neccessary on UNIX platforms.)

> Have you got any solutions?

> Thanks in advance,
> Matthias
> ____________________________________________________

> -----------------------------------------------------------------------
> Matthias Pigulla
> Please remove 'XXX' from email address when replying.
> Please mail all responses.
> Thank you.
> -----------------------------------------------------------------------


1. Compiling with gcc, libraries missing???

Rewrite your C code, because it was probably written for a DOS C
compiler. On my Linux system, I have also no process.h, dos.h (DOS??),
and io.h, but they can be found in i.e. Borland C ...

As a first approximation comment out those includes and see which
functions are undefined. Then try to replace them with either your own
code or functions from the C or system library.

Good luck!
Bernhard Sadlowski      

replace _any_ 'X' with a 'k' for reply

2. Microsoft Office 97 costs US$45 ? Shopping Paradise

3. Missing libraries when compiling with gcc

4. redhat 7.1 cannot run ftpd or rlogind

5. missing library routines (linux, gcc 2.5.8)

6. Thanks (RE: Help With Configuring HTTPD)

7. Problems with GCC and missing shared library...

8. USAGI stable release

9. clone() missing from GCC library?

10. Strange missing library error with gcc -g

11. A missing library or gcc option? libstdc++ problem?

12. GCC: Missing Libraries

13. Missing Libraries (Compiling DHCP client)