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

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>
            亚洲一区日本| 91久久精品美女| 一区二区三区视频在线观看| 亚洲精一区二区三区| 欧美视频精品在线| 亚洲综合欧美日韩| 欧美在线在线| 在线日韩欧美| 亚洲精品乱码久久久久| 欧美日韩小视频| 久久免费精品视频| 欧美精彩视频一区二区三区| 午夜精品久久久久久久久久久| 亚洲欧美一区二区视频| 亚洲丰满少妇videoshd| 日韩视频欧美视频| 激情成人亚洲| 在线亚洲伦理| 亚洲第一在线综合在线| 正在播放欧美视频| 亚洲国产精品久久久久秋霞不卡| 日韩午夜免费视频| 在线欧美日韩| 亚洲性线免费观看视频成熟| 在线国产日韩| 亚洲午夜免费视频| 亚洲精品1区| 欧美一区二区三区日韩视频| 99视频精品| 久久精品国产91精品亚洲| 一区二区三区鲁丝不卡| 久久亚洲图片| 欧美在线视频不卡| 欧美亚洲第一页| 亚洲国产精品久久久久久女王| 国产精品一区=区| 亚洲伦理在线| 亚洲人成在线免费观看| 久久精品亚洲乱码伦伦中文| 欧美一区二区三区四区在线| 欧美连裤袜在线视频| 欧美国产视频一区二区| 国模私拍视频一区| 亚洲欧美国产三级| 久久成人国产精品| 久久久久青草大香线综合精品| 欧美日韩mv| 亚洲第一精品影视| 一区二区三区在线视频免费观看| 亚洲男人的天堂在线aⅴ视频| 一区二区三区日韩欧美精品| 奶水喷射视频一区| 欧美激情精品久久久久久黑人 | 欧美人妖在线观看| 欧美激情精品久久久久| 亚洲国产小视频在线观看| 性色av香蕉一区二区| 亚洲欧美自拍偷拍| 国产欧美日韩精品在线| 亚洲图片欧洲图片av| 亚洲一区二区三区午夜| 欧美日韩国产综合新一区| 亚洲欧洲日本一区二区三区| 日韩视频久久| 欧美午夜视频在线观看| 亚洲午夜视频在线| 性欧美在线看片a免费观看| 国产精自产拍久久久久久| 午夜精品免费| 老**午夜毛片一区二区三区| 亚洲国产mv| 欧美3dxxxxhd| 在线视频精品一| 欧美伊人影院| 怡红院精品视频| 欧美黄色大片网站| 一本色道**综合亚洲精品蜜桃冫| 午夜精品剧场| 好看的日韩视频| 免费看成人av| 一本高清dvd不卡在线观看| 久久在线免费视频| 亚洲第一综合天堂另类专| aa亚洲婷婷| 国产日韩精品在线| 久久久久在线| 亚洲开发第一视频在线播放| 亚洲自拍偷拍视频| 国产情人节一区| 老牛嫩草一区二区三区日本| 亚洲高清久久| 欧美一区二区三区在线看| 国产欧美日韩麻豆91| 久久综合中文色婷婷| 一二三四社区欧美黄| 欧美综合二区| 9色porny自拍视频一区二区| 韩国欧美国产1区| 欧美母乳在线| 亚洲在线视频| 亚洲精品一区二区三区在线观看| 久久精品国产精品亚洲| 日韩一级精品视频在线观看| 国产亚洲一区二区三区| 欧美女激情福利| 久久久久久亚洲综合影院红桃| 亚洲精品欧美日韩专区| 美女久久一区| 欧美在线一区二区三区| 亚洲图片在线| 亚洲欧洲三级| 在线观看国产成人av片| 国产精品久久久久久一区二区三区| 久久一区欧美| 欧美亚洲尤物久久| 夜夜狂射影院欧美极品| 亚洲电影在线| 欧美不卡在线视频| 久久国产精品久久久| 亚洲综合视频一区| 亚洲免费电影在线观看| 国产丝袜一区二区| 欧美日韩精品综合在线| 欧美国产免费| 欧美成人综合网站| 久久精品主播| 久久精品国产欧美激情| 欧美综合第一页| 亚洲欧美激情四射在线日 | 亚洲人成毛片在线播放| 免费久久99精品国产| 久久精品91久久香蕉加勒比 | 欧美日韩一区二区三区在线视频| 久久婷婷综合激情| 欧美亚洲一级| 午夜在线播放视频欧美| 亚洲欧洲三级| 国外成人在线视频网站| 国产亚洲福利社区一区| 国产精品自在欧美一区| 国产精品一区二区你懂得| 国产精品美腿一区在线看| 国产精品综合av一区二区国产馆| 欧美日韩综合| 欧美午夜免费| 国产欧美日韩激情| 国产日韩欧美在线观看| 国内精品美女在线观看| **欧美日韩vr在线| 亚洲高清资源| 日韩午夜中文字幕| 日韩视频免费观看高清完整版| 亚洲精美视频| 永久免费毛片在线播放不卡| 国产亚洲精品自拍| 好看的亚洲午夜视频在线| 亚洲欧洲偷拍精品| 亚洲欧美日韩国产另类专区| 午夜精彩国产免费不卡不顿大片| 久久久99久久精品女同性| 欧美va天堂在线| 久久久精品一区二区三区| 久热爱精品视频线路一| 亚洲片国产一区一级在线观看| 夜夜嗨av一区二区三区网页| 亚洲欧美文学| 免费成人高清在线视频| 国产精品久久99| 好看的亚洲午夜视频在线| 亚洲欧洲在线一区| 亚洲欧美国产高清| 欧美aa国产视频| 亚洲天堂av图片| 久久在线观看视频| 国产精品国产三级国产aⅴ浪潮| 国产欧美在线看| 99国产精品久久久| 久久久亚洲精品一区二区三区 | 欧美美女视频| 国产在线视频欧美| 亚洲一区二区日本| 巨乳诱惑日韩免费av| 亚洲一区二区三区精品在线| 免费成人你懂的| 国精品一区二区三区| 国产精品99久久久久久久久| 免费成人激情视频| 亚洲欧美日韩国产综合在线| 欧美久久精品午夜青青大伊人| 国产午夜精品福利| 亚洲欧美另类综合偷拍| 亚洲国产精品一区二区久| 欧美在线视频不卡| 国产久一道中文一区| 亚洲性视频网站| 91久久久久久久久| 久久夜精品va视频免费观看| 国产日韩欧美精品一区| 亚洲欧美日韩天堂| 99re66热这里只有精品3直播|