Compile error in mlinedit.cpp

Post Reply
Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Compile error in mlinedit.cpp

Post by Keivan » Mon Nov 21, 2011 2:39 am

There is a problem compiling neuron under cygwin:
error:

Code: Select all

mlinedit.cpp: In constructor 'OcMLineEditor::OcMLineEditor(unsigned int, unsigned int, const char*)':
mlinedit.cpp:109:65: error: invalid conversion from 'const char*' to 'char*'
mlinedit.cpp:109:65: error:   initializing argument 1 of 'iv3_TextBuffer::iv3_TextBuffer(char*, int, int)'
make[3]: *** [mlinedit.lo]
nrn version: latest alpha from mercurial

My configuration:
.bashrc:

Code: Select all

export PATH=/bin:$PATH
export PATH=/usr/bin:$PATH
export HOME=/home/keivan
export PATH=$HOME/bin:$PATH
export CPU=i686
export IV="$HOME/neuron/iv"
export N="$HOME/neuron/nrn"
export PATH="$IV/$CPU/bin:$N/$CPU/bin:$PATH"
export CFLAGS="-O2 -pipe -march=native"
export CXXFLAGS="$CFLAGS"
export WANT_AUTOMAKE=1.11
cd
gcc version:

Code: Select all

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.5.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3/configure --srcdir=/gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc4 -C --datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr --with-mpfr=/usr --enable-bootstrap --enable-version-specific-runtime-libs --libexecdir=/usr/lib --enable-static --enable-shared --enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-lto --enable-java-awt=gtk --disable-symvers --enable-libjava --program-suffix=-4 --enable-libgomp --enable-libssp --enable-libada --enable-threads=posix --with-arch=i686 --with-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 CC_FOR_TARGET=gcc-4 CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake GNATBIND_FOR_TARGET=gnatbind --with-ecj-jar=/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.5.3 (GCC) 

hines
Site Admin
Posts: 1459
Joined: Wed May 18, 2005 3:32 pm

Re: Compile error in mlinedit.cpp

Post by hines » Mon Nov 21, 2011 2:32 pm

There has been a slight change to the InterViews prototype for this function.
http://www.neuron.yale.edu/hg/neuron/iv ... d20c8c9a6e
You should pull that change (or get it as a patch and apply) and rebuild using:
make
make install
or start over using
http://www.neuron.yale.edu/ftp/neuron/v ... -17.tar.gz

There were just too many warnings printed under g++-4.6.1 which obscured real problems
and just turning off warnings was not very satisfactory.

Keivan
Posts: 127
Joined: Sat Apr 22, 2006 4:28 am

Re: Compile error in mlinedit.cpp

Post by Keivan » Mon Nov 21, 2011 3:07 pm

Thanks. It was my fault.

Post Reply