Topic: problem constructing 32 bits library

I have written a simple subroutine using exp and log functions, when trying to create a dll of this code choosing 32 bits and shared library in the Project Options I get the following error message :

c:/simply fortran/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `build\Duration.o' is incompatible with i386 output

and some :

undefined reference to `log'
undefined reference to `exp'
undefined reference to `malloc'
undefined reference to `free'

Could anyone help me please ?

Re: problem constructing 32 bits library

First, in Project Options, make sure to add the following flag to the Linker flags to your DLL project:

-static

This flag ensures the DLL will contain the necessary GNU Fortran runtime routines, notably the ones you've mentioned.

Second, which version of Simply Fortran are you currently using?  Does this error occur when compiling your DLL?  Did you do a complete Clean (in the Build menu) before building?

Jeff Armstrong
Approximatrix, LLC