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

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 閱讀(1688) 評論(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>
            亚洲福利视频网站| 欧美日韩一二三区| 国产精品高潮粉嫩av| 欧美精品1区2区| 国产亚洲综合精品| 一区二区精品国产| 久久综合影视| 亚洲宅男天堂在线观看无病毒| 欧美一站二站| 欧美色大人视频| 亚洲免费观看高清完整版在线观看| 亚洲精品国久久99热| 久久噜噜噜精品国产亚洲综合 | 久久天天狠狠| 国产精品久久一卡二卡| 亚洲美女淫视频| 一区二区精品在线观看| 欧美激情综合在线| 亚洲欧美日产图| 久久精品一本久久99精品| 一区二区不卡在线视频 午夜欧美不卡'| 国产精品剧情在线亚洲| 久久久久五月天| 欧美激情国产高清| 亚洲激情视频网站| 免费日韩成人| 久久一综合视频| 中日韩美女免费视频网址在线观看 | 在线观看亚洲视频啊啊啊啊| 久久精彩免费视频| 午夜精品久久久久久久白皮肤| 国产精品一区二区久久久| 一二三四社区欧美黄| 亚洲国产精品尤物yw在线观看| 亚洲小视频在线观看| 亚洲最新在线视频| 欧美成人dvd在线视频| 亚洲激情网址| 亚洲字幕一区二区| 亚洲欧洲精品一区二区三区不卡 | 亚洲欧美日韩国产综合精品二区| 久久精品国产2020观看福利| 国产在线欧美日韩| 久久综合给合久久狠狠色| 久久久久中文| 亚洲精品国产视频| 小黄鸭精品密入口导航| 国产在线乱码一区二区三区| 欧美一级二区| 欧美一级在线亚洲天堂| 精品成人久久| 亚洲高清资源| 亚洲欧美日韩在线一区| 91久久亚洲| 欧美一区二区大片| 国产精品99久久久久久宅男| 久久综合国产精品| 亚洲精品专区| 久久精品视频亚洲| 亚洲乱码久久| 久久久久综合一区二区三区| 黄色一区二区三区| 亚洲午夜激情免费视频| 国产欧美一区二区三区久久人妖| 久久亚洲一区二区三区四区| 欧美视频在线观看免费| 欧美激情中文不卡| 欧美久久九九| 午夜精品久久久久久久久久久久 | 一区二区av| 久久婷婷亚洲| 久久久久久久久岛国免费| 国产精品福利在线观看网址| 欧美激情视频在线播放| 韩国av一区二区三区| 欧美激情视频一区二区三区不卡| 国产偷国产偷亚洲高清97cao| 欧美成人免费观看| 欧美日韩一区二区三区在线观看免| 欧美顶级大胆免费视频| 国产在线观看91精品一区| 亚洲欧美日本国产专区一区| 亚洲视频精选在线| 欧美国产视频在线| 欧美激情成人在线视频| 一区二区三区在线免费视频| 午夜国产精品视频免费体验区| 亚洲一级在线观看| 欧美日韩一区二区高清| 亚洲激情网站免费观看| 国产精品夜夜夜| 欧美激情a∨在线视频播放| 国产一区二区黄| 午夜视黄欧洲亚洲| 欧美伊久线香蕉线新在线| 欧美大色视频| 亚洲高清精品中出| 亚洲欧洲日韩在线| 久热精品视频在线| 欧美国产第二页| 亚洲福利视频网| 女同一区二区| 久久婷婷国产综合精品青草| 国产视频久久久久久久| 亚洲欧美日韩综合一区| 欧美在线视频观看| 欧美精品一区二区在线播放| 亚洲激情在线观看视频免费| 亚洲精品字幕| 欧美破处大片在线视频| 亚洲精选中文字幕| 在线不卡中文字幕| 亚洲女性喷水在线观看一区| 欧美亚洲尤物久久| 国产欧美一区二区三区久久人妖| 亚洲欧美视频在线观看| 久久精品人人做人人综合| 美女主播视频一区| 久久精品国产精品亚洲综合| 国产亚洲精品久久久久动| 欧美专区第一页| 麻豆精品国产91久久久久久| 欧美日本亚洲| 中国亚洲黄色| 亚洲精品欧美| 欧美日韩国产首页在线观看| 欧美91视频| 国产一区二区三区免费不卡| 久久精品二区亚洲w码| 亚洲大片在线观看| 亚洲另类自拍| 国产精品九色蝌蚪自拍| 亚洲欧美久久久| 玖玖综合伊人| 99精品国产在热久久婷婷| 欧美成人免费在线视频| 99国产精品久久久久老师| 午夜精品福利在线观看| 狠狠噜噜久久| 欧美国产在线观看| 亚洲桃花岛网站| 久久亚洲欧洲| 99视频一区二区| 国产精品夜色7777狼人| 久久夜色精品国产| 亚洲欧洲精品一区二区三区| 亚洲欧美精品在线观看| 国产一区在线播放| 欧美黄色视屏| 亚洲免费人成在线视频观看| 美女视频一区免费观看| 日韩亚洲视频| 国产一区导航| 欧美激情亚洲另类| 亚洲香蕉网站| 欧美不卡一卡二卡免费版| 正在播放亚洲| 韩国三级电影久久久久久| 欧美激情导航| 亚洲欧美日韩国产综合精品二区| 蜜臀a∨国产成人精品| 一区二区激情| 国产精品一区亚洲| 免费成人在线视频网站| 在线视频精品一区| 欧美成人免费播放| 午夜视频久久久| 亚洲欧洲精品天堂一级| 国产精品免费一区豆花| 另类激情亚洲| 亚洲一区二区免费视频| 欧美影视一区| 亚洲欧洲日产国产综合网| 国产精品久久久免费| 老司机一区二区三区| 亚洲一区久久久| 欧美高清一区| 久久精品日韩欧美| 一区二区三区成人精品| 黄色资源网久久资源365| 欧美亚州一区二区三区| 亚洲在线成人精品| 亚洲国产精品第一区二区三区| 久久成人一区二区| 一本大道久久精品懂色aⅴ| 伊人久久婷婷色综合98网| 国产精品va| 欧美国产日韩精品免费观看| 欧美伊人久久大香线蕉综合69| 99成人在线| 亚洲第一伊人| 久久在线免费观看| 香蕉久久久久久久av网站| 99精品国产福利在线观看免费 | 欧美在线日韩在线| 一区二区三区黄色| 亚洲电影免费观看高清| 国产日韩精品一区二区| 欧美午夜片在线观看| 欧美成人午夜免费视在线看片 |