change SETGPC.BAT

Jay Michael <[email protected]>
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
     SETGPC.BAT does not allow me to compile C using gpc:
           gpc tc.c -o tc

     As installed by dev_gnu_pascal-1.9.4.13.exe, SETGPC.BAT:

          set PATH=C:\prg\GPC\bin;%PATH%
          set C_INCLUDE_PATH=C:\prg\GPC\include
          set GCC_BASE=3.4.5
          set GPC_EXEC_PREFIX=C:\prg\GPC\libexec\gcc\mingw32
          set LIBRARY_PATH=C:\prg\GPC\lib;C:\prg\GPC\lib\gcc\mingw32\%GCC_BASE%
          set GPC_UNIT_PATH=C:\prg\GPC\lib\gcc\mingw32\%GCC_BASE%\units;C:\prg\GPC\units;C:\prg\GPC\units\winapi;C:\prg\GPC\units\objects;C:\prg\GPC\units\sysutils;C:\prg\GPC\units\objmingw

     I have been able to compile and link Pascal and C (one each) by
only changing PATH.

     Separately, I succeeded by appending 
c:\prg\gpc\lib\gcc\mingw32\3.4.5\include to C_INCLUDE_PATH.
(After running SETGPC.BAT)

     I don't know what to say is wrong.  The lack of a trailing slash on
GPC_EXEC_PREFIX results in a horrible mess in one of the attempted
directories
(C:/prg/GPC/libexec/gcc/mingw32mingw32/3.4.5/../../../../include/stddef.h)
but appending a slash doesn't solve the real problem, because "libexec"
is the wrong path to get to an include directory.
     Does GPC have different rules for the EXEC_PREFIX than GCC, so the
lack of a trailing slash is not a mistake for GPC_EXEC_PREFIX?

     Does the setting of all of the variables other than PATH date back
to a time before GPC did such an elaborate job of fabricating
directory names?  Or before GPC had the target and version wired in?

     Is it likely that all I need is to prepend GPC/bin to PATH?
Or do you think I will need some of the other environment variables
when I get around to trying to compile more substantial programs?

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
TPAS.PAS (text/plain, 69 B)
program TPAS( INPUT, OUTPUT ) ;
begin
WRITELN( 'end TPAS' ) ;
end.
TC.C (text/plain, 178 B)
#include "stdio.h"

int main( int argc, char * argv[], char * envp[] )
{
  int i ;

  for ( i = 0 ; i < argc ; i++ )
    printf( "argv[%d] = \"%s\"\n", i, argv[i] ) ;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.