Prev: hough
Next: Wavelets for Images - Help!
From: Gideon on 7 May 2010 20:46 I have MATLAB 2010a on my OS X 10.6 macbook, and it's run fine so far. Recently, I tried to use MEX with some older C code I had, which previously had worked fine. When trying to compile them I get the following warnings: ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/ libgsl.dylib, file was built for i386 which is not the architecture being linked (x86_64) ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libstdc+ +.dylib, file was built for i386 which is not the architecture being linked (x86_64) I've seen some other posts on here about this, but it was unclear if there was an actual resolution. As I'm also having trouble with libstdc++.dylib, and not just libgsl, I suspect this is a systemwide problem.
From: Brian Arnold on 10 May 2010 09:43 Hi Gideon, It looks like you have installed the 64-bit version of MATLAB (maci64, architecture x86_64), and the two libraries in question are 32-bit libraries (architecture i386) which were manually built outside of MATLAB in /usr/local/lib (since this path normally does not exist by default), does that sound right? You need to either recompile your older C code with CFLAGS, CXXFLAGS and LDFLAGS set to include '-arch x86_64', or you need to install the 32-bit version of MATLAB R2010a, to continue using the old MEX file and libraries. Take a look at MATLAB's MEX command with the verbose option ('-v') to see what MATLAB uses to compile code with gcc, and make sure your manually built libraries are compatible. I would caution you strongly against using with a hand-built version of libstdc++.dylib that was not provided by Apple. There is a high risk that the runtime library doesn't match the system's, and this can lead to subtle problems in your MEX file or other standalone code at runtime. Good luck, - Brian Gideon wrote: > I have MATLAB 2010a on my OS X 10.6 macbook, and it's run fine so > far. Recently, I tried to use MEX with some older C code I had, which > previously had worked fine. When trying to compile them I get the > following warnings: > > ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/ > libgsl.dylib, file was built for i386 which is not the architecture > being linked (x86_64) > ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libstdc+ > +.dylib, file was built for i386 which is not the architecture being > linked (x86_64) > > I've seen some other posts on here about this, but it was unclear if > there was an actual resolution. As I'm also having trouble with > libstdc++.dylib, and not just libgsl, I suspect this is a systemwide > problem.
|
Pages: 1 Prev: hough Next: Wavelets for Images - Help! |