Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Using Sparselib++ library on eclipse - Build error
Using Sparselib++ library on eclipse - Build error [message #537787] Thu, 03 June 2010 16:00 Go to next message
sandhya is currently offline sandhyaFriend
Messages: 9
Registered: May 2010
Junior Member
Hi,

I am using Sparselib++ in this C++ program.

#include <iostream>
#include <cstdlib>
#include "comprow_double.h"
using namespace std;

int main() {
	cout << "Sparse example" << endl; // prints Sparse example
	
	double val[12]={1,2,3,4,5,6,7,8,9,10,11,12};
	int colind[12]={0,1,4,0,1,2,1,2,4,3,0,4};
	int rowptr[6]={0,3,6,9,10,12};
	
	CompRow_Mat_double R (5,5,12,val,rowptr,colind);
	return 0;
}


I have added the -D preprocessor statement in the Project->Properties->C/C=++ Build->Settings->Preprocessor. The -D statement added here is
[COMPLEX=std::complex<double>
which was given in the Sparselib++ makefile.def as
# g++ v. 2.7.0
#
CCC 			= g++
CC 				= gcc	
CCCFLAGS 	=  -DMV_VECTOR_BOUNDS_CHECK -g -Wall -pedantic\ 
     '-DCOMPLEX=std::complex<double>'  
CCCFLAGS 	=  -g -Wall -pedantic -O3 '-DCOMPLEX=std::complex<double>'  
LDFLAGS	= $(SPARSELIB_DIR)/lib/libsparse.a $(SPARSELIB_DIR)/lib/libspblas.a \
					$(SPARSELIB_DIR)/lib/libmv.a -lm 


Now the build error I get is as follows saying " /bin/sh: double: No such file or directory'"

make -k all 
Building file: ../src/sparseCpp.cpp
/bin/sh: double: No such file or directory
Invoking: GCC C++ Compiler
g++ -DCOMPLEX=std::complex<double> -I/home/s/Download/SparseLib++/1.7/include -I/home/s/Download/SparseLib++/1.7/src -I/home/s/Download/SparseLib++/1.7/mv/include -I/home/s/Download/SparseLib++/1.7/mv/src -O0 -g3 -p -Wall -c -fmessage-length=0 -v -MMD -MP -MF"src/sparseCpp.d" -MT"src/sparseCpp.d" -o"src/sparseCpp.o" "../src/sparseCpp.cpp"
make: *** [src/sparseCpp.o] Error 1
make: Target `all' not remade because of errors.


Please let me know what I have overlooked.
Re: Using Sparselib++ library on eclipse - Build error [message #538504 is a reply to message #537787] Mon, 07 June 2010 18:58 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Did you see the "sticky" message at the top of this Newcomers forum
titled "Problems with C/C++ in Eclipse? Read this."

Eric


On 6/3/10 12:00 PM, sandhya wrote:
> Hi,
>
> I am using Sparselib++ in this C++ program.
> #include <iostream>
> #include <cstdlib>
> #include "comprow_double.h"
> using namespace std;
>
> int main() {
> cout << "Sparse example" << endl; // prints Sparse example
>
> double val[12]={1,2,3,4,5,6,7,8,9,10,11,12};
> int colind[12]={0,1,4,0,1,2,1,2,4,3,0,4};
> int rowptr[6]={0,3,6,9,10,12};
>
> CompRow_Mat_double R (5,5,12,val,rowptr,colind);
> return 0;
> }
>
> I have added the -D preprocessor statement in the
> Project->Properties->C/C=++ Build->Settings->Preprocessor. The -D
> statement added here is [COMPLEX=std::complex<double>which was given in
> the Sparselib++ makefile.def as # g++ v. 2.7.0
> #
> CCC = g++
> CC = gcc
> CCCFLAGS = -DMV_VECTOR_BOUNDS_CHECK -g -Wall -pedantic\
> '-DCOMPLEX=std::complex<double>' CCCFLAGS = -g -Wall -pedantic -O3
> '-DCOMPLEX=std::complex<double>' LDFLAGS =
> $(SPARSELIB_DIR)/lib/libsparse.a $(SPARSELIB_DIR)/lib/libspblas.a \
> $(SPARSELIB_DIR)/lib/libmv.a -lm
> Now the build error I get is as follows saying " /bin/sh: double: No
> such file or directory'"
>
> make -k all Building file: ../src/sparseCpp.cpp
> /bin/sh: double: No such file or directory
> Invoking: GCC C++ Compiler
> g++ -DCOMPLEX=std::complex<double>
> -I/home/s/Download/SparseLib++/1.7/include
> -I/home/s/Download/SparseLib++/1.7/src
> -I/home/s/Download/SparseLib++/1.7/mv/include
> -I/home/s/Download/SparseLib++/1.7/mv/src -O0 -g3 -p -Wall -c
> -fmessage-length=0 -v -MMD -MP -MF"src/sparseCpp.d" -MT"src/sparseCpp.d"
> -o"src/sparseCpp.o" "../src/sparseCpp.cpp"
> make: *** [src/sparseCpp.o] Error 1
> make: Target `all' not remade because of errors.
>
> Please let me know what I have overlooked.
>
Re: Using Sparselib++ library on eclipse - Build error [message #538515 is a reply to message #538504] Mon, 07 June 2010 19:53 Go to previous message
sandhya is currently offline sandhyaFriend
Messages: 9
Registered: May 2010
Junior Member
Oh...posted it to the wrong sub-group then!.No wonder I never got any replies. Will take care next time. Smile
Nevertheless I got the issue solved from here since it was a mix of C++ and eclipse-related errors. (http://www.daniweb.com/forums/post1241921.html#post1241921)
Previous Topic:Eclipse 3.2 to helios
Next Topic:mismatched input ....expecting ....
Goto Forum:
  


Current Time: Fri Mar 29 07:17:26 GMT 2024

Powered by FUDForum. Page generated in 0.04070 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top