Author Topic: make a DLL from FORTRAN code with PGI compilers  (Read 1319 times)

Offline BDick

  • Single posting newcomer
  • *
  • Posts: 7
make a DLL from FORTRAN code with PGI compilers
« on: December 18, 2018, 09:22:23 am »
I am migrating my FORTRAN projects from OpenWatcom to the PGI compiler. Since this comes without a IDE, I have chosen CODE::BLOCKS. So far its working fine for the project type "FORTRAN application". However, when building a project type "FORTRAN DLL", I get an error message. It seems that the compiler receives the option -shared, which the PGI compiler apparently does not know. However, nowhere in the project options dialog can I select (or de-select) this option. Where can I find this setting and change it to what the PGI-compiler expects (e.g. -Bdynamic).
many thanks,
« Last Edit: December 18, 2018, 01:08:53 pm by BDick »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7130
    • My Best Post
Re: make a DLL from FORTRAN code with PGI compilers
« Reply #1 on: December 18, 2018, 04:37:52 pm »
Settings -> Compiler
Full to the right tab "Other Settings"
Tab "Advanced Options"
Tab "Commands"
Command: "Link object files to dynamic library"
Command line macro value likely needs edited; but, I would suggest using a separate profile for FORTRAN.

Edit link to profile/personality option

Tim S.
« Last Edit: December 18, 2018, 05:06:45 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
When in doubt, read the CB WiKi FAQ.