Re: Creating MAT-file programs



Simon <nothx@xxxxxxxxxx> writes:

Hi, I wrote a C/C++ program that convert a text file into .mat file.
I can compile on my Windows computer (that has Matlab installed, and
setting Microsoft Visual C++ to use the extern libraries). But I
also want to use this program on Linux computers.

According to:
<http://www.mathworks.com/support/solutions/data/1-16AEN.html?solution=1-16AEN>
I can do that on Linux, all I have to do is download the MAT library
files. And tell the compiler/linker where to find the files.

However, when I couldn't get the program to link, it keeps giving me
the following error:
/usr/bin/ld: skipping incompatible ...../v6/libmat.so when searching
for -lmat
So, that means it find the .so files, but the linker believes they
are incompatible and ignores them.

I tried to download different version, but they all give me the same
error. The following are the location I downloaded the files:
<http://www.mathworks.com/support/solutions/files/s8757/v6/lib/glnx86/>
<http://www.mathworks.com/support/solutions/files/s8757/libc6/>
<http://www.mathworks.com/support/solutions/files/s8757/lib/lnx86/>

Could it be because my Linux machines are Athlon64 computers, with
x86_64 OS?

Yes.

Do I need special version of those libraries? If so, where can I get
them.

Maybe. Try compiling with the -m32 switch, to compile in 32-bit
application mode. You'll lose the benefits of 64-bit for this
application, but who cares? This way the library you downloaded might
work...

If not, you will need the 64-bit libraries.

--
Peter Boettcher <boettcher@xxxxxxxxxx>
MIT Lincoln Laboratory
MATLAB FAQ: http://www.mit.edu/~pwb/cssm/
.



Relevant Pages

  • Re: Carrying Libraries on Your Back...
    ... > Why not build on an installed based of assemblies, ... > than porting libraries around, ... download source code ... compile local source against header files ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Free design engineering book
    ... some more libraries and re-compile some programs. ... Hmm ... ... Getting newer software is such a pain when I have to download ... and compile a half dozen libraries before I can compile the desired ...
    (rec.crafts.metalworking)
  • Re: Problems using gtk on object-oriented attempt
    ... When I use these libraries, does that mean that people have to download ... guess a compiled program runs over gtk, but if someone wants to compile ... At the moment I don't write anything for Windows and it's ...
    (comp.os.linux.development.apps)
  • Re: Problems using gtk on object-oriented attempt
    ... When I use these libraries, does that mean that people have to download ... guess a compiled program runs over gtk, but if someone wants to compile ... At the moment I don't write anything for Windows and it's ...
    (comp.os.linux.development.apps)
  • Re: sendmail smtp auth using sasl
    ... Your first step is to download, compile and install the OpenSSL libraries. ...
    (comp.unix.solaris)