青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

EverSpring working shop

To pursue creative ideas based on nature.

統計

留言簿(1)

他山之石

閱讀排行榜

評論排行榜

How to Compile/Test Loki source code in Linux

Previously, I review and test the source code of the Loki under the windows XP by the visual C++ express. It is easy to compile and test the Loki code in windows. Just download the zip file or the .exe file from the sourceforge website. The directory contains the Visual C++ project file, which can read the makefile automatically and compile the code in the test directory very easily. However, you may not know the dependency between the src files in this project because they are hidden in the makefile and the src code themselves.
?
Today, I update my PC to the Linux Enviroment and tried to re-install the visual C++ express in the windows based on the vmware. Unfortunately, the VC++ express failed to be installed sucessfully due to some unknown errors. So I turn to compile and test the code purely in the Linux envrioment, as the Loki states that it is completely supported by the gcc.
?
Actually, it is a little mysterial that how to compile the test code, at least generate?the .o file to run under the command line, because I am not sure how to dedicate the include path for a specified src file and futher how to include other src files on which the on-testing files are depending.
?
Select the file Factory.cpp as an example. Before I test the this src file, I have no idea that which files should this Factory.cpp use.
First step, because all the .h files this Loki project uses are all stored in the directory ../loki-0.1.7/include, even I have no compelete knowlege that which .h files are used in this test, I can indicate the g++ compiler to search the dedicated directory firstly before the current directory and the system including directory. Just like below:
?
g++ -I? /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/include/ -o /localdisk/data/alex_dyn/hello /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/test/Factory/Factory.cpp
?
However, although the .h files can be found, many errors? like "undefined reference to `Loki::SmallObjAllocator::~SmallObjAllocator()" blocks the generation of the hello.o. It is because some implementation of the methods are not found. Actually, only the .h files are inlcuded, but the implementaiton files are not found.
So, I need to find where these undefined references are, i.e, find the src files which the Factory.cpp depends on. As the all the source files are already added to the sourceinsight tool project, it is easy to find that the undefined references are from two files Singleton.cpp and SmallObj.cpp. Actually, all the libary src .cpp files (not the testing files with main() function )?are in the directory /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/src.
How to let the Factory.cpp to know where these undefined reference to be found? I ever tried to dedicate the src directory in the compiling process, but failed. When checking the priciple for writing the Makefile in the linux envriroment, it is found that I can compile the depending files to .o files firstly, with the compile option -c, which means no executive files are generated for those src files without main() function. Usage of the -c option?is usually used to make the modules which?are linked later to?other modules.?
?
So the next step?is to?compile the Singleton.cpp and SmallObj.cpp to generat the?middle product Singleton and SmallObj.
?
g++ -c -I? /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/include/ -o /localdisk/data/alex_dyn/SmallObj /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/src/SmallObj.cpp
g++ -I? /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/include/ -c -o /localdisk/data/alex_dyn/Singleton /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/src/Singleton.cpp
?
We can see two result files: SmallObj and Singleton in directory /localdisk/data/alex_dyn
[alexzh@alexzhang_lnx alex_dyn]$ ll /localdisk/data/alex_dyn
total 328
drwxr-xr-x? 2 root?? root????? 4096 Feb? 6 19:54 boost
drwxr-xr-x? 3 root?? root????? 4096 Feb 15 15:45 loki
-rw-r-----? 1 alexzh NSS_VC??? 7260 Feb 15 17:07 Singleton
-rw-r-----? 1 alexzh NSS_VC?? 57244 Feb 15 16:47 SmallObj

With these two depending files,?I tried to?linked them to Factory.cpp when compiling the Factory.cpp as:
[alexzh@alexzhang_lnx src]$ g++ -I? /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/include/ -o /localdisk/data/alex_dyn/hello /localdisk/data/alex_dyn/Singleton/localdisk/data/alex_dyn/SmallObj /localdisk/data/alex_dyn/loki/loki-0.1.7/loki-0.1.7/test/Factory/Factory.cpp
The final executive file hello are found in the /localdisk/data/alex_dyn now. Enter this?diretory and execute the hello as
[alexzh@alexzhang_lnx alex_dyn]$ pwd
/localdisk/data/alex_dyn
[alexzh@alexzhang_lnx alex_dyn]$ hello
?
creator function is a simple function:
createProductNull()
createProductParm( int a, int b )
?
creator function is a overloaded function:
createProductOver()
createProductOver( int a, int b )
?
creator function is a member function:
Creator::create()
Creator::create( int a, int b )
?
creator function is a template member function
CreatorT<T>::create()
CreatorT<T>::create( int a, int b )
?
creator function is a functor parameter
createProductParm( int a, int b )
??? called by createProductRuntime(CreateFunctor func, int a, int b)
CreatorT<T>::create( int a, int b )
??? called by createProductRuntime(CreateFunctor func, int a, int b)
?
Registered ids:
Four
One
Three
Two
?
OK, that is the way I can follow to debug the rest files in this Loki project......Opps..
?

posted on 2009-02-15 19:43 everspring79 閱讀(1673) 評論(4)  編輯 收藏 引用 所屬分類: Notes

評論

# re: How to Compile/Test Loki source code in Linux 2009-02-15 20:08 everspring79

For any suggestion or experience of you on this pratice, please kindly reply this tip directly. Thanks!  回復  更多評論   

# re: How to Compile/Test Loki source code in Linux 2009-02-16 09:25 zuhd

nice English, how can you do this, really amazing!  回復  更多評論   

# re: How to Compile/Test Loki source code in Linux 2009-02-16 11:53 true

ni de ying yu hen hao ,ru he zuo dao de?mao si ni zai wai qi  回復  更多評論   

# re: How to Compile/Test Loki source code in Linux[未登錄] 2009-02-16 11:58 Everspring79

@true
Yes, English is our working language, which is mandatory in all kinds of communications like email, conference, presentation, document, etc. Actually, it is quite simple to use English for technical communication, compared with the daily English.  回復  更多評論   

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美成人午夜影院| 一区二区三区在线观看国产| 在线视频欧美日韩| 亚洲精品免费一二三区| 亚洲电影在线| 亚洲精品视频中文字幕| 亚洲乱码国产乱码精品精天堂| 亚洲国产另类久久精品| 亚洲精品日产精品乱码不卡| 一区二区三区.www| 欧美亚洲一区二区三区| 久久亚洲午夜电影| 欧美人交a欧美精品| 国产精品免费网站| 亚洲电影在线看| 亚洲剧情一区二区| 亚洲欧美文学| 免费短视频成人日韩| 最近中文字幕日韩精品| 亚洲综合大片69999| 另类av导航| 国产精品免费电影| 亚洲黄色成人久久久| 亚洲字幕在线观看| 欧美高清在线观看| 欧美中文字幕精品| 中国成人黄色视屏| 久久免费视频这里只有精品| 欧美精品免费播放| 国产亚洲一二三区| 国产精品99久久久久久久vr | 亚洲精品国精品久久99热| 亚洲午夜在线观看| 欧美黄色一级视频| 国产欧亚日韩视频| 亚洲免费精彩视频| 久久久久一区二区三区| 夜夜嗨网站十八久久 | 欧美另类综合| 国内免费精品永久在线视频| 亚洲一区二区三区精品动漫| 欧美成人国产一区二区| 午夜精品久久久久久久久久久久| 欧美国产激情| 激情自拍一区| 香蕉久久久久久久av网站| 亚洲国产婷婷| 麻豆精品视频在线观看视频| 国产亚洲视频在线| 午夜精品在线看| 亚洲美女免费精品视频在线观看| 久久久久久久波多野高潮日日| 国产精品乱子乱xxxx| 99精品热视频只有精品10| 你懂的国产精品永久在线| 欧美一区二区三区四区高清| 国产精品视频福利| 先锋影音一区二区三区| 亚洲午夜激情网页| 国产精品免费福利| 午夜精品视频网站| 亚洲一二三级电影| 国产精品亚洲一区| 亚洲欧美中文另类| 在线视频欧美精品| 欧美亚一区二区| 亚洲欧美成人一区二区在线电影| 亚洲国产日韩欧美| 欧美日产国产成人免费图片| 99re6热只有精品免费观看| 亚洲黄色成人网| 欧美日韩国产综合久久| av成人免费在线| 99日韩精品| 国产毛片久久| 玖玖玖国产精品| 老鸭窝亚洲一区二区三区| 亚洲国产精品成人精品| 亚洲国产精品免费| 欧美视频一区二区| 久久精品视频99| 亚洲国产精品成人一区二区| 国产精品美女主播| 亚洲电影欧美电影有声小说| 蜜桃av一区二区| 欧美国产一区二区| 亚洲一本视频| 欧美专区18| 日韩视频免费| 亚洲尤物在线视频观看| 一区二区三区我不卡| 亚洲韩国青草视频| 国产伦精品一区二区三区视频孕妇| 久久精品欧美| 欧美国产欧美亚洲国产日韩mv天天看完整 | 国产精品每日更新| 久久久综合网| 欧美片网站免费| 久久精品国产精品亚洲| 欧美a级在线| 欧美一级欧美一级在线播放| 久久在线播放| 欧美亚洲综合在线| 欧美激情国产高清| 久久久一区二区三区| 欧美三级乱码| 欧美18av| 国产伦精品免费视频| 亚洲国产国产亚洲一二三| 国产欧美日韩精品一区| 亚洲欧洲一区| 在线观看欧美| 午夜日韩av| 亚洲在线观看视频网站| 欧美电影美腿模特1979在线看| 久久av二区| 国产精品久久久一区二区| 亚洲二区视频| 在线播放亚洲| 久久成人18免费网站| 欧美一区二区在线| 欧美日韩日韩| 亚洲精品久久久久久下一站 | 亚洲一二三级电影| 一本色道久久综合狠狠躁篇的优点| 久久久国产视频91| 久久久精品网| 国产亚洲福利| 校园春色综合网| 欧美在线观看网站| 国产精品无人区| 亚洲综合电影| 午夜亚洲福利在线老司机| 欧美三区不卡| 宅男噜噜噜66一区二区66| 99精品欧美| 欧美精品一区二区三区在线看午夜 | 欧美国产日本在线| 黄色一区三区| 久久九九热re6这里有精品| 欧美在线观看网站| 国产欧美一区二区三区另类精品 | 在线观看日韩av电影| 久久激情婷婷| 久久亚洲精品视频| 极品尤物一区二区三区| 久久网站免费| 欧美va亚洲va香蕉在线| 亚洲福利久久| 欧美韩国在线| 99热这里只有成人精品国产| 宅男在线国产精品| 国产精品视频成人| 欧美在线三区| 亚洲国产高清在线| 亚洲一区二区毛片| 国产人成精品一区二区三| 久久国产精彩视频| 亚洲福利精品| 亚洲综合精品四区| 韩国av一区二区三区四区| 男人插女人欧美| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美日韩美女一区二区| 99在线精品视频在线观看| 欧美在线观看视频在线| 在线免费高清一区二区三区| 欧美极品欧美精品欧美视频| 亚洲综合色视频| 欧美成年人视频网站| 亚洲午夜性刺激影院| 国产日韩欧美制服另类| 麻豆国产精品va在线观看不卡| 日韩亚洲欧美一区| 久久久伊人欧美| 中文国产成人精品| 伊人成人在线视频| 欧美四级电影网站| 久久亚洲高清| 在线综合亚洲| 亚洲动漫精品| 久久激情五月丁香伊人| 亚洲理论电影网| 国模一区二区三区| 欧美日韩综合在线| 美女脱光内衣内裤视频久久网站| 亚洲无线一线二线三线区别av| 美女脱光内衣内裤视频久久影院| 中文在线一区| 亚洲人成网站在线播| 国产综合欧美| 国产精品亚洲一区| 欧美日韩日本国产亚洲在线| 久久久中精品2020中文| 午夜精品美女自拍福到在线| 亚洲高清免费| 免费不卡亚洲欧美| 久久精品国产99国产精品| 国产乱码精品一区二区三区av| 亚洲国产毛片完整版|