Topic: How to liink PGPLOT

Hi Jeff,
I used the package manager to install PGPLOT which seemed to go without a hitch and my makefiles show the PGPLOT paths but....
when I attempt to build and link my program, all the calls to PGPLOT are unresolved. Is there something else that I should be doing? This is my first attempt using a package installed with the package manager.  My makefile is below.
Regards,
Pete
#
# Automagically generated by Approximatrix Simply Fortran 3.31
#
FC="C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin\gcc.exe"
AR="C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin\ar.exe"
WRC="C:\Program Files (x86)\Simply Fortran 3\mingw-w64\bin\windres.exe"
PRJTK="C:\Program Files (x86)\Simply Fortran 3\fwin\sfprjtk.exe"
RM=rm -f

IDIR=-IC:/Users/peter/AppData/Local/sfpm/64/include

LDIR=-LC:/Users/peter/AppData/Local/sfpm/64/lib


OPTFLAGS= -O3 -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -mtune=ivybridge

SPECIALFLAGS=-fmax-errors=30

RCFLAGS=-O coff --use-temp-file

PRJ_FFLAGS=

PRJ_CFLAGS=

PRJ_LFLAGS=

FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(IDIR) $(PRJ_FFLAGS) -Jd:/fortranwork/Delme/modules

CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(IDIR) $(PRJ_CFLAGS)

"build\testplot.o": ".\testplot.f90"
    @echo Compiling .\testplot.f90
    @$(FC) -c -o "build\testplot.o" $(FFLAGS) ".\testplot.f90"

clean: .SYMBOLIC
    @echo Deleting build\testplot.o and related files
    @$(RM) "build\testplot.o"
    @echo Deleting target.exe
    @$(RM) "target.exe"

"target.exe":  "build\testplot.o"
    @echo Generating target.exe
    @$(FC) -o "target.exe" $(SPECIALFLAGS) -static "build\testplot.o" $(LDIR) $(PRJ_LFLAGS)

all: "target.exe" .SYMBOLIC

Re: How to liink PGPLOT

Pete,

You need to add the necessary libraries for linking PGPlot to Compiler Flags in Project Options.  In the Compiler Flags category of Project Options, you should see a button marked "Package Flags..." that you need to click.  You can select the PGPlot example project in the window that pops up, and it should add the appropriate linker flags for PGPlot.

Let me know if it works!

Jeff Armstrong
Approximatrix, LLC

Re: How to liink PGPLOT

Hi Jeff,
no luck. I get Conway's game of life , OpenMP, simple DLL, and shared library DLL as entries
Regards,
Pete

Re: How to liink PGPLOT

Pete,

The flags option isn't showing up because your project is 64-bit, and the example template is 32-bit, I believe.  This behavior has been an annoying problem that I've been attempting to solve since some projects aren't available on both architectures.

Regardless, in Project Options under Compiler Flags, add the following to the Linker box:

-fno-backslash -lpgplot -lpng -lz -lmsvcrt -luser32 -lkernel32 -lgdi32

You can leave your project as 64-bit without any issues.

Jeff Armstrong
Approximatrix, LLC

Re: How to liink PGPLOT

Hi Jeff,
    I got it to work in 32bit mode with a lot of compilation warnings, which I included below. However, it will not compile in 64 bit mode but throws errors related to MINGW and the error output is below the 32 bit output. I haven't done more than run the test suite & they seem to work as designed.
Regards,
Pete
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
32 BIT
f951.exe: Warning: Nonexistent include directory 'C:/PROGRA~2/SIMPLY~1/MINGW-~1/include/' [-Wmissing-include-dirs]
Generating target.exe
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libuser32.a when searching for -luser32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libuser32.a when searching for -luser32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgdi32.a when searching for -lgdi32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libgdi32.a when searching for -lgdi32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgfortran.dll.a when searching for -lgfortran
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgfortran.a when searching for -lgfortran
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libgfortran.a when searching for -lgfortran
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libquadmath.dll.a when searching for -lquadmath
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libquadmath.a when searching for -lquadmath
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libquadmath.a when searching for -lquadmath
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libadvapi32.a when searching for -ladvapi32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libadvapi32.a when searching for -ladvapi32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libshell32.a when searching for -lshell32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libshell32.a when searching for -lshell32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libuser32.a when searching for -luser32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libuser32.a when searching for -luser32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libm.a when searching for -lm
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingw32.a when searching for -lmingw32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libgcc_s.a when searching for -lgcc_s
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmingwex.a when searching for -lmingwex
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libmsvcrt.a when searching for -lmsvcrt
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib//libkernel32.a when searching for -lkernel32
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/\libkernel32.a when searching for -lkernel32

* Complete *
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
64 bit
Compiling .\pgdemo1.f
f951.exe: Warning: Nonexistent include directory 'C:/PROGRA~2/SIMPLY~1/MINGW-~1/include/' [-Wmissing-include-dirs]
Generating target.exe
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0xa5): undefined reference to `__p__fmode'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0xb5): undefined reference to `__p__commode'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x254): undefined reference to `_set_invalid_parameter_handler'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.text+0x26c): undefined reference to `__p__acmdln'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_app_type[.refptr.__mingw_app_type]+0x0): undefined reference to `__mingw_app_type'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltssuo_force[.refptr.__mingw_initltssuo_force]+0x0): undefined reference to `__mingw_initltssuo_force'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltsdyn_force[.refptr.__mingw_initltsdyn_force]+0x0): undefined reference to `__mingw_initltsdyn_force'
c:/program files (x86)/simply fortran 3/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o:crtexe.c:(.rdata$.refptr.__mingw_initltsdrot_force[.refptr.__mingw_initltsdrot_force]+0x0): undefined reference to `__mingw_initltsdrot_force'
collect2.exe: error: ld returned 1 exit status

Re: How to liink PGPLOT

Pete,

Can you send your makefile and project file for your project to support@approximatrix.com?  Your project seems to have some odd options set in regards to search directories.  I'm not sure how they got set.

Jeff Armstrong
Approximatrix, LLC

Re: How to liink PGPLOT

Pete,

With your sample project, I am not seeing any of the behavior you've outlined.  The only things I would suggest is:

  • make sure to clean your project after changing the architecture

  • In Project Options under File Locations, remove the entries "Default Library Directory" and "Default Include Directory" from the Library and Include tabs respectively.  They are vestiges of an older Simply Fortran.

Let me know if that helps.

Jeff Armstrong
Approximatrix, LLC

Re: How to liink PGPLOT

Hi Jeff,
That worked perfectly. I have tried it at 32bit and 64bit without problems. I have it up and running and while a bit "clunkier" than I had remembered, it works fine. I had to retain the default add-on directory for the libraries for it to find the pGPLOT libs but cleared everything else.
Thanks very much.