help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OS X module compilation issue


From: Ludovic Pénet
Subject: OS X module compilation issue
Date: Tue, 07 Dec 2004 11:55:18 +0100

Hello.

I have a problem compiling octave modules on OS X. I usually use
GNU/Linux and I am pretty new on OS X.

If I compile  the following code sample ( a stripped down version on the
real version I use )


#include "wx/wx.h"
#include "octave/oct.h"

DEFUN_DLD(mist_verbose, args,, "mist_verbose")
{
  bool bVerbose = args(0).bool_value();
  wxLog::SetVerbose(bVerbose);
  return octave_value_list();
}

using the following command

$ mkoctfile -v -D__WXDEBUG__ -D__WXMAC__ -DWXMAKINGDLL
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/Users/lpenet/dev/mist
-I/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/lib/wx/include/macd-2.4 
-I/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/include  -I/sw/include 
-L/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/lib -lwx_macd-2.4 
mist_verbose_octave.cpp

I obtain this output :

g++ -c -no-cpp-precomp -I/sw/include -I/sw/include/octave-2.1.53
-I/sw/include/octave-2.1.53/octave -I/sw/include -g -O2
-I/Users/lpenet/dev/mist
-I/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/lib/wx/include/macd-2.4 
-I/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/include -I/sw/include 
-D__WXDEBUG__ -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES 
mist_verbose_octave.cpp -o mist_verbose_octave.o
g++ -bundle -bundle_loader /sw/bin/octave-2.1.53 -o
mist_verbose_octave.oct mist_verbose_octave.o
-L/Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/lib -lwx_macd-2.4
-L/sw/lib/octave-2.1.53 -loctave -lcruft -loctinterp -framework vecLib
ld: warning multiple definitions of symbol _round
/sw/bin/octave-2.1.53 definition of _round
/usr/lib/libSystem.dylib(rndint.o) definition of _round

then, when I try to use this sample module using octave (and having
added /Users/lpenet/dev/thirdparty/wxwindows-mac-2.4.2d/lib to
LD_LIBRARY_PATH), I obtain the following output :

address@hidden:/tmp$ octave -V
GNU Octave, version 2.1.53 (powerpc-apple-darwin7.6.0).
Copyright (C) 2004 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

reading commands from /sw/share/octave/2.1.53/m/startup/octaverc ...
done.

octave:1> path(path,'/tmp//');
octave:2> mist_verbose_octave
error: couldn't link module /private/tmp/mist_verbose_octave.oct

The version octave running on my OS X box was installed using fink a few
days ago.

If I build a dummy module depending on no thirdparty library, I have no
problem.

Ex:

#include <stdio.h>
#include <octave/oct.h>

DEFUN_DLD(test_mkoct, args,, "")
{
  octave_value_list ovlRetList;
  printf("coucou\n");
  return ovlRetList;
}

$ mkoctfile -v test_mkoct.cpp 
g++ -c -no-cpp-precomp -I/sw/include -I/sw/include/octave-2.1.53
-I/sw/include/octave-2.1.53/octave -I/sw/include -g -O2 test_mkoct.cpp
-o test_mkoct.o
g++ -bundle -bundle_loader /sw/bin/octave-2.1.53 -o test_mkoct.oct
test_mkoct.o -L/sw/lib/octave-2.1.53 -loctave -lcruft -loctinterp
-framework vecLib

address@hidden:~$ octave -V
GNU Octave, version 2.1.53 (powerpc-apple-darwin7.6.0).
Copyright (C) 2004 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

reading commands from /sw/share/octave/2.1.53/m/startup/octaverc ...
done.

octave:1> path(path,'~//');        
octave:2> test_mkoct  
coucou
octave:3> 

Any idea ?

Thanks in advance, 

Ludovic



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]