linux - makefile issues when using Eclipse C++ on Ubuntu -


i'm getting "make: ***[diffusionweightstest] error 1" , "recipe target 'diffusionweightstest' failed" errors when trying build program in eclipse's c++ ide. if open makefile, following code block implicated error (specifically, error on @echo 'building target: $@'):

diffusionweightstest: $(objs) $(user_objs)     @echo 'building target: $@'     @echo 'invoking: gcc c++ linker'     g++  -o "diffusionweightstest" $(objs) $(user_objs) $(libs)     @echo 'finished building target: $@'     @echo ' ' 

if create new helloworld c++ project , build it, seems work fine. beyond linking gsl libraries, haven't done other copy in .c , .h code files (from windows machine, wrote them).

i'd c++ development using eclipse's ide , gsl library on virtual ubuntu linux machine. installed oracle's jdk, gsl library (following install guidelines), , eclipse's latest c++ ide. in program's properties, linked gsl , gslcblas libraries (right-click project name >> properties >> c/c++ build >> settings >> gcc c++ linker >> libraries >> add both gslcblas , gsl libraries (-l) ) such eclipse seems recognize functions in code.

any ideas might causing makefile error?

just figured out, actually. apparently, there's particular order in how link gsl libraries project. have list "gsl" first , list "gslcblas".

so, clarify, after you've installed gsl library (download package website, extracted it, opened terminal inside gsl folder, ./configure, make, sudo make install), have link gsl , gslcblas libraries eclipse project. right-click project name in project explorer in eclipse >> properties >> c/c++ build >> settings >> gcc c++ linker >> libraries >> add both gsl , gslcblas libraries (-l).

but must put gsl first , gslcblas. order matters. you'll errors above otherwise.


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -