trouble with Matrix.h while compiling

Qbox installation issues
Forum rules
You must be a registered user to post in this forum. Registered users may also post new topics if they consider that their subject do not correspond to any topic already present on the forum.
Post Reply
wangfc
Posts: 8
Joined: Thu Nov 26, 2009 4:09 am

trouble with Matrix.h while compiling

Post 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
fgygi
Site Admin
Posts: 167
Joined: Tue Jun 17, 2008 7:03 pm

Re: trouble with Matrix.h while compiling

Post by fgygi »

What is your version of g++ ? (use g++ -v to find out).
wangfc
Posts: 8
Joined: Thu Nov 26, 2009 4:09 am

Re: trouble with Matrix.h while compiling

Post by wangfc »

my g++ version is 4.3.2
and attachment is my .mk file
Attachments
gcc.mk
(2.29 KiB) Downloaded 1081 times
fgygi
Site Admin
Posts: 167
Joined: Tue Jun 17, 2008 7:03 pm

Re: trouble with Matrix.h while compiling

Post 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.
Post Reply