Results 1 to 1 of 1
Hello folks!
I'm a newbie and I've a problem!
I've to work with a c++ code and I don't know how to import it and how to compile it on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-06-2010 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 1
Eclipse c++ how to compile and work with existing code
Hello folks!
I'm a newbie and I've a problem!
I've to work with a c++ code and I don't know how to import it and how to compile it on eclips ( I compiled it by command line).
The code has a particular structure and it is organized in this way:
tu be sure that you understand my problem....Code:repos____lib____configure (execute the configure file inside the libraries folders) I I___makefile (execute the make file inside the libraries folders, requires make/make.def) I I___ib1____.cpp I I I____.h I ... I____configure (it requires make/configure_lib and make/configure_includes I ... I____makefile (generated by configure) I I___lib2___.... i I___....... I I___libn____.cpp i I____.h i I____configure i I____makefile (generated by configure) I I___make(folder)__bashrc (are set the some environment variables) I I__configure_bin I I__configure_includes I I__configure_lib I I__make.def (are set all the include path and library path used I in the configure file) I___application__main.cpp I__configure I__makefile(generated by the configure file)
the first configure file is:
and the first makefile isCode:cd lib1; ./configure cd ../lib2; ./configure ..... .... cd ../libn; ./configure cd
an example of configure file (the one inside lib1):Code:include /media/Dati/WORKHOME/repos/make/make.def # this is the makefile for the whole library lib: make -C lib1 make -C lib2 make -C libn
compile it without eclipse is simpleCode:#!/usr/bin/perl ##################### $INC = '$(OPENCVINC) $(FLTKINC) $(DC1394V2INC)'; ##<-DEFINED IN /make.def $LIB = '$(OPENCVLIB) $(FLTKLIB) $(DC1394V2LIB)'; ##################### #------------------------------------------------------------------------------- require '/media/Dati/WORKHOME/repos/make/configure_lib'; print "Created Makefile.\n"; # this will create a include file for the whole directory, # using the template <dirname>.h.templ require '/media/Dati/WORKHOME/repos/make/configure_includes'; print "Created $libname.h\n";
1) type /.configure in the lib folder
2) type make
3) go into the application folder
4) type ./configure
5) type make
6) run the program
my question is....in eclipse???
I imported the three with import/ import existing code as makefile project but now I don't know how compile it.
could you please help me? it's important!
thank you very much
gabriele


Reply With Quote
