bdn.borland.com

Article #29221: Cannot find standard header files when compiling Kylix/C++ application

// to be edited in the future. do not make public

Question

Why can't the Kylix C++ compiler see the standard header files such as 'stdint.h' 'pthread.h' and semaphore.h'?

Answer

If the header files do not appear in the '/usr/include' or '/include' directories, then it's likely the sytem is not configured for development. Most linux distributions have multiple installation configurations, allowing systems to be configured to be servers, workstations, or simple desktop boxes. Generally speaking, Kylix will run best on the 'workstation' configuration, as it is meant for development.

To resolve the problem you must either re-install Linux with the 'workstation' configuration, or find the missing packages and install them into the existing system. The first option is the simlest and easiest to accomplish and is reccommended for beginning Linux users. The latter requires more knowledge of Linux internals and the particular distribution you use. You will probably find the required packages ('kernel-headers' and 'glibc-devel') either on the Linux installation disk or on your distribution's website.

If, on the other hand, the header files can be found in your system include paths, then you probably just need to add those paths to the command line (using the -I<directory path> command-line option), makefile (the same as command-line), or project file you are using (click Project, Options, Directories/Conditionals, Include Path).

Last Modified: 22-APR-03