Page 1 of 1

trouble with Matrix.h while compiling

Posted: Thu Nov 26, 2009 3:18 pm
by wangfc
Hi every one, I am a fresher to Qbox, I got some problems when compling the Qbox 1.50.1
My platform is a workstation with Ubuntu
Thanks in advance for your time and kind help

The error message are :

Code: Select all

/usr/bin/g++ -g -O4 -DLinux_x8664 -I/usr/include/mpi/ -I/usr/include -I/home/fatcharm/Qbox/lib/Xerces-C/include -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES  -DTARGET='"gcc"'   -c -o AtomSet.o AtomSet.C
/usr/bin/g++ -g -O4 -DLinux_x8664 -I/usr/include/mpi/ -I/usr/include -I/home/fatcharm/Qbox/lib/Xerces-C/include -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES  -DTARGET='"gcc"'   -c -o Atom.o Atom.C
/usr/bin/g++ -g -O4 -DLinux_x8664 -I/usr/include/mpi/ -I/usr/include -I/home/fatcharm/Qbox/lib/Xerces-C/include -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES  -DTARGET='"gcc"'   -c -o Species.o Species.C
/usr/bin/g++ -g -O4 -DLinux_x8664 -I/usr/include/mpi/ -I/usr/include -I/home/fatcharm/Qbox/lib/Xerces-C/include -DIA32 -DUSE_FFTW -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DSCALAPACK -DADD_ -DAPP_NO_THREADS -DXML_USE_NO_THREADS -DUSE_XERCES  -DTARGET='"gcc"'   -c -o Wavefunction.o Wavefunction.C
In file included from SlaterDet.h:26,
                 from Wavefunction.C:21:
Matrix.h: In copy constructor ‘DoubleMatrix::DoubleMatrix(const DoubleMatrix&)’:
Matrix.h:158: Error: ‘memcpy’ is not declared in the scope
Matrix.h: In copy constructor ‘ComplexMatrix::ComplexMatrix(const ComplexMatrix&)’:
Matrix.h:411: Error: ‘memcpy’ is not declared in the scope
make: *** [Wavefunction.o] Error 1

Re: trouble with Matrix.h while compiling

Posted: Thu Nov 26, 2009 10:31 pm
by fgygi
What is your version of g++ ? (use g++ -v to find out).

Re: trouble with Matrix.h while compiling

Posted: Fri Nov 27, 2009 1:23 am
by wangfc
my g++ version is 4.3.2
and attachment is my .mk file

Re: trouble with Matrix.h while compiling

Posted: Fri Nov 27, 2009 3:55 am
by fgygi
The memcpy function is defined in string.h. Apparently, with some earlier versions of gcc (e.g. 4.1.2), including <string> is sufficient to get memcpy defined, but not in later versions. You can add #include<cstring> in the appropriate files to resolve the issue. I will add these includes in the next release.