octave-maintainers
[Top][All Lists]
Advanced

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

Re: mex.h:54: error: conflicting declaration 'typedef void mxArray'


From: Joe Koski
Subject: Re: mex.h:54: error: conflicting declaration 'typedef void mxArray'
Date: Sat, 29 Jul 2006 12:36:16 -0600
User-agent: Microsoft-Entourage/11.2.5.060620

on 7/29/06 11:24 AM, John W. Eaton at address@hidden wrote:

> On 29-Jul-2006, Joe Koski wrote:
> 
> | I've been tied up finishing a paper, so I haven't done much with octave
> | lately. I saw John's announcement of 2.9.7, so I thought I try building it
> | on my Mac G5 with recently upgraded OS X 10.4.7, and Xcode tools 2.3. Xcode
> | 2.3 has Apple's gcc-4.0.1. I have made some progress. My goal is to figure
> | out the Mac build problems before we see them on the octave help list.
> | 
> | So far, I have built the GNU version of the readline library and configure
> | is choosing it ahead of Apple's so-called readline.
> | 
> | I found I had libgcc.dylib both in /usr/lib and /usr/local/lib, so I renamed
> | the /usr/local/lib version. I don't know why I have both, but I suspect the
> | g95 and gfortran compilers required their installation at one time or
> | another, possibly in two locations.
> | 
> | I added a symbolic link pointing libgcc_s.dylib to libgcc_s.1.dylib, when
> | one of my attempts couldn't find -lgcc_s.
> | 
> | Now, when I configure with ./configure --enable-shared --disable-static
> | F77=gfortran
> | 
> | The "make -j2" build goes for 16 minutes or so, and ends with
> | 
> | g++ -c  -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H
> | -Wall -W -Wshadow -Wold-style-cast -g -O2 pager.cc -o pager.o
> | pager.cc: In function 'bool pager_event_handler(pid_t, int)':
> | pager.cc:120: warning: use of old-style cast
> | g++ -c  -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H
> | -Wall -W -Wshadow -g -O2 parse.cc -o parse.o
> | mex.h:54: error: conflicting declaration 'typedef void mxArray'
> | mxarray.h:122: error: 'class mxArray' has a previous declaration as 'class
> | mxArray'
> | make[2]: *** [parse.o] Error 1
> | make[2]: *** Waiting for unfinished jobs....
> | make[1]: *** [src] Error 2
> | make: *** [all] Error 2
> | 
> | which looks like an actual C error rather than a build error to me. Is
> | gcc-4.0.1 the problem?
> 
> It built cleanly for me with gcc 4.0.4.  There are two different
> declarations for mxArray, one is a typedef void, which is public, and
> the other is the actual declaration of mxArray as a class, which is
> private.  But these are always supposed to be kept separate, so there
> should be no problem that there are two different types use.
> 
> Oh, I see now.  I think the problem is matrix.h vs Matrix.h.  Remove
> the src/matrix.h file and try again.
> 
> jwe

John,

I made the change by renaming matrix.h, and the build now goes to
completion, although the completion is different from my experience with
2.1.xx, where you're sure it's done. The last few lines are about making
example files, but I do have an octave executable and a mkoctfile.

I remember reading somewhere that Macs are "case preserving," but not "case
sensitive," so Matrix.h and matrix.h are probably confusing the OS because
they are equivalent file names.

I have to install a car battery, but maybe later this weekend I'll try to do
an installation. I want to have the latest octave-forge from CVS ready to
build before I attempt it.

Joe




reply via email to

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