Topic: Program Compiles & Runs OK as 32 bit but not 64 bit

Program compiles & runs OK as 32 bit.  However, when I do a build as 64 bit, lots of undefined references come up.  See sample below.  Would appreciate advice 0n what I haven't done correctly.  Is it another compiler flag?

Open Watcom Make Version 1.9 (Built on Feb  4 2013)
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
    "C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe" -o "test3.exe" "build\Test2.o" -LC:/PROGRA~2/SIMPLY~2/MINGW-~1/lib/
c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `build\Test2.o' is incompatible with i386:x86-64 output
build\Test2.o: In function `fddata_':
C:\Users\geoff\Documents\Simply Fortran test/./Test2.f90:629: undefined reference to `__gfortran_st_write'
C:\Users\geoff\Documents\Simply Fortran test/./Test2.f90:629: undefined reference to `__gfortran_transfer_integer_write'
C:\Users\geoff\Documents\Simply Fortran test/./Test2.f90:629: undefined reference to `__gfortran_st_write_done'
C:\Users\geoff\Documents\Simply Fortran test/./Test2.f90:630: undefined reference to `__gfortran_st_write'

Re: Program Compiles & Runs OK as 32 bit but not 64 bit

Make sure that after you change the architecture of your project that you perform a "Clean" operation first by selecting "Clean" from the Build menu.  I'm guessing that the compiler is attempting to link your 32-bit object files that reference 32-bit runtime functions.

Jeff Armstrong
Approximatrix, LLC

Re: Program Compiles & Runs OK as 32 bit but not 64 bit

jeff wrote:

Make sure that after you change the architecture of your project that you perform a "Clean" operation first by selecting "Clean" from the Build menu.  I'm guessing that the compiler is attempting to link your 32-bit object files that reference 32-bit runtime functions.

Yes, that solved the problem.  Thanks for the quick response.