pgcc on Windows + SUA

Hi all,

I’m compiling Gromacs application on Windows. Since Gromacs is a Linux based application, I’m using SUA (Subsystem for Unix Applications).

The make command thrown an error:

 /dev/fs/C/PGI/win64/six/bin/pgcc.exe -I F:MSMPIInclude F:MSMPILibamd64msmpi.lib F:MSMPILibamd64msmp
e.lib -DHAVE_CONFIG_H -I. -I. -I../../src -I../../include -DGMXLIBDIR=\"/opt/groprl/share/top\" -IF:
Portinggromacsfftw3include -O1 -c enxio.c -o enxio.obj
PGC-S-0040-Illegal use of symbol, off_t (../../include\gmxfio.h: 126)
PGC-W-0156-Type not specified, 'int' assumed (../../include\gmxfio.h: 126)
PGC-S-0035-Syntax error: Recovery attempted by replacing identifier off_t by typedef id .Z0000 (../.
./include\gmxfio.h: 129)
PGC-W-0095-Type cast required for this conversion (enxio.c: 90)
PGC/win64/x86-64 win64 6.2-3: compilation completed with severe errors
*** Error code 1

*** Error code 1

Line No: 126 of gmxfio.h is:

extern off_t fio_ftell(int fio);      //////////// LINE NO 126
/* Return file position if possible */

extern void fio_seek(int fio,off_t fpos);
/* Set file position if possible, quit otherwise */

Line No. 90 of enxio.c is:

static void rd_ener_nms(FILE *in,int *nre,char ***nm)
  char line[256];
  int  i;

  if (sscanf(line,"%d",nre) == 0) {
  for(i=0; (i< (*nre)); i++) {
    (*nm)[i]=strdup(line);      ///////////////Line No:90

I’ve tested a sample program with linking external libraries and header files by pgcc.exe. Its working fine. But not getting how to resolve the above error.

Can anyone there know how to resolve the error?

Thank you,


If you compile under SUA, you will need to use PGI SUA compiler. It looks to me you use window compiler.



PGI for SUA? Earlier I installed a fortran application using PGI Windows compiler only.

Ok. I searched for PGI SUA compiler. But only Workstation and Server are available. I’m using Workstation. Is SUA compiler ship with Workstation? or Server? or separately…?

Direct link for download pgiwsx64-sua-721.exe

On my Interix 5.2 its needs some patch of libpgc.a because it has missing variable _extern int _fsw;
PS: link for patched libpgc.a for pgcc 7.2-1 64-bit target on 64-bit SUA
if you got any error messages due compilation time about missing __fsw than replace original file at /opt/pgi/sua64/7.2-1/lib/

Hi La00,

Do you have an example code which show the undefined symbol error that you could send to


$ pgcc failed.c -lintl -liconv
libpgc.a(fp_top_chk.o) : error LNK2019: unresolved external symbol __fsw referenced in function __pgio_ini2
a.out : fatal error LNK1120: 1 unresolved externals

More detailed info I sends at email