www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/02/01/09:59:47

Date: Mon, 1 Feb 93 09:45:29 EST
From: DJ Delorie <dj AT ctron DOT ctron DOT com>
To: oconnor AT software DOT org
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: mixing C and C++

>I am having a problem compiling a program that mixes C and C++. The
>problem stems from the fact that I need to include ".h" files from both
>the C (/djgpp/include) and the C++ (/djgpp/cplusinc) directories. I
>have been using the bat file "gnu.bat" to set up my include paths but
>the path that came with the distribution:
>  set C_PLUS_INCLUDE_FILES=c:/djgpp/include;c:/djgpp/cplusinc
>  (don't be concerned if the above is not the correct variable name, I may
>   have gotten the name wrong HERE since I am typing this from memory) 
>doesn't seem to work (Gcc can't find the C++ include files). If I change 
>the variable to simply c:/djgpp/cplusinc it will find the C++ include 
>files, but then it obviously can't find the C ones. What am I missing?

You should put the c++ directory first, since some files have the same
names.  The syntax above is correct, but make sure you have the latest
djgpp (1.09) as it used to be different.  Also, watch out for trailing
spaces.

Dj

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019