Ich bin ein Neuling und ich habe ein Problem! Ich muss mit einem C++ Code arbeiten und ich weiß nicht, wie man es importiert und wie man es auf eclips kompiliert (ich kompilierte es über die Befehlszeile). Der Code hat eine besondere Struktur, und es wird auf diese Weise organisiert:Eclipse C++ Wie man mit vorhandenem Makefile arbeitet
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)
sicher sein, dass Sie mein Problem verstehen ... (sicher ... :))
die erste configure-Datei :
cd lib1; ./configure
cd ../lib2; ./configure
.....
....
cd ../libn; ./configure
cd
und die erste Make-Datei ist
include /media/Dati/WORKHOME/repos/make/make.def
dies die Make-Datei ist für die gesamte Bibliothek
lib:
make -C lib1
make -C lib2
make -C libn
ein Beispiel für configure-Datei (die innerhalb lib1):
#!/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";
kompilieren ohne Eclipse ist einfach
- Typ /.configure im Ordner lib
- Typ machen
- gehen Sie in den Anwendungsordner
- Typ configure
- Typ
meine Frage ist .... in Eclipse
vielen Dank gabriele
+1 für die wohlgeformt und formatierte Frage für eine Person, mit 6 rep. (: –
@Kiril: Ich stimme zu – neuro