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

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>
            久久精品国产综合精品| 香蕉成人久久| 欧美日韩视频在线一区二区观看视频| 亚洲精品国产精品国自产观看 | 在线视频你懂得一区| 99亚洲一区二区| 国产精品免费区二区三区观看| 午夜久久久久久久久久一区二区| 亚洲欧美日韩精品| 亚洲第一久久影院| 国产自产女人91一区在线观看| 宅男噜噜噜66一区二区66| 日韩一级成人av| 欧美a级片网| 亚洲国产成人高清精品| 久久精品国产999大香线蕉| 国产精品美女久久久浪潮软件| 久久五月激情| 欧美日韩一区二区视频在线观看| 欧美在线观看你懂的| 欧美高清视频| 久久精品女人天堂| 欧美日韩一区成人| 牛人盗摄一区二区三区视频| 欧美涩涩网站| 欧美不卡一区| 国产伦精品一区| 亚洲国产第一页| 国产手机视频一区二区| 亚洲激情一区二区三区| 国产一区亚洲一区| 亚洲天堂av图片| 日韩视频一区| 久久视频一区| 欧美一区二区视频在线观看| 欧美精品 国产精品| 久久综合久久综合久久综合| 欧美日韩综合不卡| 亚洲精品日产精品乱码不卡| 一区久久精品| 性欧美video另类hd性玩具| 国产精品99久久99久久久二8 | 亚洲高清资源| 韩国女主播一区二区三区| 亚洲午夜av电影| 一个人看的www久久| 欧美99久久| 欧美大片一区| 在线观看欧美激情| 久久久精品国产一区二区三区| 欧美在线视频不卡| 国产精品永久免费| 亚洲自拍偷拍视频| 亚洲图片欧美一区| 国产精品大片| 一区二区三区免费看| 亚洲一卡久久| 国产精品成人aaaaa网站| 日韩小视频在线观看专区| 日韩午夜免费| 欧美日韩成人一区二区| 亚洲国产精品成人一区二区| 91久久久久久| 欧美久久久久久久| 亚洲美女黄色| 亚洲一区二区三区在线观看视频| 欧美日韩另类一区| 一区二区三区欧美| 欧美一区二区三区视频免费播放 | 激情久久五月天| 久久久www成人免费毛片麻豆| 久久女同精品一区二区| 亚洲第一二三四五区| 欧美大片18| 日韩视频免费在线观看| 午夜在线精品偷拍| 国产午夜精品福利| 美女视频黄a大片欧美| 亚洲区中文字幕| 亚洲欧美日韩在线不卡| 国产欧美精品| 免费在线欧美黄色| 在线视频一区观看| 久久久噜噜噜久久久| 亚洲黄一区二区三区| 欧美日韩国产丝袜另类| 亚洲欧美日韩系列| 欧美 日韩 国产精品免费观看| 亚洲精品久久久久久久久久久久久| 欧美日韩一二三区| 久久成人在线| 日韩午夜精品| 老司机精品导航| 宅男在线国产精品| 黄色精品网站| 欧美视频国产精品| 久久久精品一区| 日韩视频三区| 免费久久久一本精品久久区| 国产精品99久久久久久久久| 国产一区二区三区自拍| 欧美日韩亚洲综合| 开心色5月久久精品| 中文亚洲欧美| 亚洲国产专区| 开元免费观看欧美电视剧网站| 99视频有精品| 黄色亚洲网站| 国产精品免费区二区三区观看| 蜜桃av久久久亚洲精品| 欧美影院在线播放| 亚洲免费黄色| 亚洲丰满在线| 久久久久网址| 欧美怡红院视频| 夜夜嗨av一区二区三区免费区| 国内在线观看一区二区三区| 国产精品高清网站| 欧美精品一区在线发布| 麻豆精品视频| 久久久人成影片一区二区三区| 亚洲一级在线观看| 一区二区三区四区国产| 亚洲精品欧美精品| 亚洲国产精品久久久久秋霞蜜臀| 久久久久免费视频| 久久国产视频网| 午夜日韩在线| 欧美一区二区视频免费观看| 亚洲欧美国产77777| 一区二区三区精品久久久| 91久久精品国产| 最新精品在线| 亚洲人被黑人高潮完整版| 亚洲激情电影在线| 91久久线看在观草草青青| 一区二区三区在线视频播放| 激情丁香综合| 亚洲国产一区二区在线| 91久久精品国产| 亚洲久久成人| 一区二区三区欧美在线观看| 亚洲剧情一区二区| 一本色道久久加勒比精品| 一区二区欧美激情| 亚洲一区二区欧美| 欧美一级精品大片| 久久夜色撩人精品| 欧美成人蜜桃| 亚洲精品国产欧美| 中国av一区| 性8sex亚洲区入口| 久久视频在线视频| 欧美精品福利| 国产精品免费看| 一区二区视频免费完整版观看| 在线成人免费观看| 亚洲美女毛片| 亚洲欧美网站| 久久一日本道色综合久久| 亚洲第一综合天堂另类专| 亚洲伦理一区| 欧美亚洲一级片| 欧美成人一区二区三区在线观看 | 亚洲午夜羞羞片| 性一交一乱一区二区洋洋av| 毛片一区二区| 日韩午夜电影av| 欧美一级片久久久久久久| 毛片基地黄久久久久久天堂| 欧美日韩国产成人精品| 国产精品一区二区久久久久| 亚洲第一偷拍| 亚洲免费在线观看| 男女激情久久| 亚洲午夜激情免费视频| 久久久久久久精| 欧美色一级片| 亚洲国产经典视频| 亚洲欧美成人网| 亚洲成人在线免费| 日韩午夜精品视频| 久久久另类综合| 亚洲精品一区二区三区蜜桃久| 亚洲欧美在线一区| 欧美大片网址| 国模私拍视频一区| 亚洲免费人成在线视频观看| 欧美大片在线观看一区| 亚洲欧美三级在线| 欧美日韩精品一区二区| 在线观看久久av| 久久本道综合色狠狠五月| 91久久夜色精品国产网站| 久久福利视频导航| 国产欧美1区2区3区| 亚洲一二三区在线观看| 亚洲国产视频一区二区| 久久久蜜桃精品| 国产一区二区在线观看免费|