के साथ कैसे काम करें मैं एक नौसिखिया हूं और मुझे कोई समस्या है! मुझे एक सी ++ कोड के साथ काम करना है और मुझे नहीं पता कि इसे कैसे आयात किया जाए और इसे ग्रहण पर कैसे संकलित किया जाए (मैंने इसे कमांड लाइन द्वारा संकलित किया)। कोड एक विशेष संरचना है और यह इस तरह से आयोजित किया जाता है:ग्रहण C++ मौजूदा मेकफ़ाइल
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)
यकीन है कि तुम मेरी समस्या को समझते हैं होने के लिए ... (यकीन है कि ... :))
पहले कॉन्फ़िगर फ़ाइल है :
cd lib1; ./configure
cd ../lib2; ./configure
.....
....
cd ../libn; ./configure
cd
और पहली makefile
include /media/Dati/WORKHOME/repos/make/make.def
है इस makefile है पूरे पुस्तकालय
lib:
make -C lib1
make -C lib2
make -C libn
के लिए कॉन्फ़िगर फ़ाइल (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";
ग्रहण के बिना यह संकलन lib फ़ोल्डर में सरल
- प्रकार /.configure है
- प्रकार
- एप्लिकेशन फ़ोल्डर पर जाएं
- प्रकार कॉन्फ़िगर
- प्रकार बनाने
- कार्यक्रम
मेरे सवाल है .... ग्रहण में चला ??? मैंने मेकफ़ाइल प्रोजेक्ट के रूप में आयात/आयात मौजूदा कोड के साथ तीन आयात किए लेकिन अब मुझे नहीं पता कि इसे कैसे संकलित करें। क्या आप कृपया मेरी मदद कर सकते हैं? यह महत्वपूर्ण है!
आपको बहुत बहुत गैब्रिएल
सुनिर्मित के +1 और 6 प्रतिनिधि के साथ, एक व्यक्ति के लिए सवाल तैयार किया। (: –
@ किरील: मैं सहमत हूं – neuro