Topic: Problems with MUESLI

I am trying to use MUESLI-2.6.6 (Optimized, DLL)  from Simply Fortran 1.41. I have 64-bit Windows 7, but since MUESLI is at least until now 32 bit, I have selected 32 bit architecture from Project Options Dialog, and added "-m32" to the Project Flags of both Fortran and C Compilers in the same Dialog. I have also added the MUESLI dll folder to the Windows "PATH".

I have added the MUESLI dll folder to the Search Directories => Library Directories dialog. When I try to build by simple test program "mueslitest.f95" (below) I get the errors below.

program mueslitest
use fml
implicit none
type(mfArray) :: A
A=mfRand(2,3)
call msDisplay( A, "A" )
end program mueslitest


Generating Makefile... Okay
==============================================================================
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\mingw-w64\bin\gfortran.exe" -o "mueslitest.exe" -static -m32 "build\mueslitest.o" -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -LC:/Users/...(exact path removed).../muesli-2.6.6_zlib_opt_dll
build\mueslitest.o: In function `mueslitest':
C:\Users\...(exact path removed).../mueslitest.f95:5: undefined reference to `__mod_elmat_MOD_mfrand_two_arg'
C:\Users\...(exact path removed).../mueslitest.f95:5: undefined reference to `__mod_core_MOD_msassign_mfarray_copy'
C:\Users\...(exact path removed).../mueslitest.f95:6: undefined reference to `__mod_core_MOD_msdisplay_mfarray'
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (mueslitest.exe) returned a bad status
Error(E02): Make execution terminated

* Complete *


I also tried adding all the dll files + fml.mof + libz.a that came with MUESLI to the mueslitest project (not a very beautiful solution). Then "Build Now!" works without error messages, but "Launch!" gives the error message that the file "libgcc_s_sjlj-1.dll" is missing from the computer. My computer does have plenty of files with that name (most of them under the C:\Program Files (x86)\Simply Fortran\mingw-w64 folder).

What to do?

Re: Problems with MUESLI

Your second solution was correct; you'll need to instruct the compiler somehow that it has to link those additional libraries.  The second error you're receiving, specifically missing "libgcc_s_sjlj-1.dll," is due to MUESLI being unable to locate some GCC runtime libraries.  Normally this isn't an issue with Simply Fortran because it statically links this library into your project.  The file is, however, on your system.

There are two solutions:

Cleanest - Add "C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\lib32" to your path

Simplest - Copy all dll's in "C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\lib32" to your project folder

Jeff Armstrong
Approximatrix, LLC

Re: Problems with MUESLI

Thank you again! The clean solution works nicely.