[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mex.h:54: error: conflicting declaration 'typedef void mxArray'
From: |
John W. Eaton |
Subject: |
mex.h:54: error: conflicting declaration 'typedef void mxArray' |
Date: |
Sat, 29 Jul 2006 13:24:05 -0400 |
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