Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

Can't run dll compiled in windows on linux/wine

Alexander_I_1
Beginner
768 Views

We recently switched to Parallel Studio from MS Visual Studio (2005 I think) intel fortran compiler version 10.1.011. We have an application developed for windows that uses a DLL also developed by us, and it is primarily used by the windows based users. However, it is also used on Linux with wine. Up till now both the executable and the dll compiled with the old fortran compiler ran just fine. After switching to the parallel studio the dll no longer runs with wine. I've made a really simple exe that call a really simple DLL (both win32 applications) to test this out and get the same error message "err:module:attach_process_dlls "TEST_DLL.dll" failed to initialize, aborting". It probably some compiler setting. Any idea where the problem could be?
 

0 Kudos
3 Replies
Steven_L_Intel1
Employee
768 Views

You're also using a compiler from 2005?!

My guess is that your DLL is linked to the Intel Fortran and Microsoft Visual C++ DLLs so those are also required. See if changing the DLL project property Fortran > Libraries > Use Run-Time Library to "Multithreaded" helps. This links to static libraries.

0 Kudos
Alexander_I_1
Beginner
768 Views

Hi Steve,

No the compiler we are currently using is version 16.0.0062.12 and all libraries are static. All of the programs run just fine on windows too and not just on the developer machine.

The problem we are having is that nothing compiled with the "new" compiler (the one we got with the parallel studio xe 2016) works on wine. Previous version of the program compiled with the compiler from 2005 runs just fine. The problem doesn't even seem to be with the dll. I've made a simple win32 "Hello World" 3 line program, even that crashes.

"wine: Unhandled page fault on execute access to 0x00000000 at address (nil) (thread 0009), starting debugger..."

 

0 Kudos
Steven_L_Intel1
Employee
768 Views

Does a MSVC "Hello World: built with a current Visual Studio also fail? What if you link the object from the 10.0 compiler with the newer linker and libraries? Maybe Microsoft changed something in the linker that Wine doesn't understand. We don't, of course, claim support for running programs under Wine.

0 Kudos
Reply