- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I built a C++ DLL on Windows using Visual Studio 2010 with a Fortran library I built with the Intel compiler.
I then loaded it into my Java program. Everything works fine on the PC side. When I put my code over to the LINUX side, java gives me this error message: invalid ELF header (Possible cause: endianness mismatch) about my DLL file.
A quick google search has suggestions to add "-fPIC" to their gcc compiler/linker command. Is there an equivalent for Visual Studio? Does this mean I need to have two DLLs built? One for Windows and One for LINUX?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No object files, EXE files and DLLs built on Windows will work in Linux (unless you are running inside a VM). The only items that may be moved, and even then some changes may be needed, are HLL program source (Fortran, C, Java) files, Java class files, text data files and some makefiles.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that must be my problem then. I run the JVM on Windows and on LINUX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page