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

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>
            亚洲国产精品尤物yw在线观看| 国内久久婷婷综合| 日韩视频永久免费观看| 欧美1区2区| 免费在线国产精品| 亚洲精品国产精品国产自| 亚洲丁香婷深爱综合| 美脚丝袜一区二区三区在线观看| 亚洲第一页中文字幕| 亚洲国产高清在线观看视频| 欧美区亚洲区| 亚洲主播在线| 亚洲欧美日韩系列| 伊人影院久久| 亚洲人午夜精品免费| 欧美性天天影院| 欧美在线视频免费观看| 久久久噜噜噜久久中文字幕色伊伊 | 最新高清无码专区| 亚洲日本中文字幕| 国产精品久久激情| 久久婷婷国产综合尤物精品| 欧美jizz19hd性欧美| 亚洲视频日本| 久久精品国产69国产精品亚洲| 狠狠色噜噜狠狠狠狠色吗综合| 亚洲国产精品久久久久久女王| 欧美天堂亚洲电影院在线播放| 欧美亚洲一区二区三区| 久久一区二区三区av| 中文欧美日韩| 麻豆精品视频| 性欧美1819sex性高清| 麻豆精品视频在线| 欧美一区二区高清在线观看| 美女露胸一区二区三区| 性色av一区二区三区| 欧美aⅴ99久久黑人专区| 欧美在线观看视频| 欧美国产精品久久| 久久久夜精品| 国产精品欧美精品| 亚洲国产精品尤物yw在线观看| 国产精品美女在线| 亚洲国语精品自产拍在线观看| 国产精自产拍久久久久久| 亚洲人成网站精品片在线观看| 国内精品伊人久久久久av影院 | 亚洲国产欧美在线| 国产一区二区三区免费不卡| 亚洲精品久久7777| 亚洲欧洲三级| 久久久亚洲精品一区二区三区| 午夜精品久久久久久久| 欧美精品在线播放| 欧美激情一二区| 精品成人在线视频| 久久精品亚洲一区二区三区浴池| 亚洲欧美中文在线视频| 欧美日韩国产在线一区| 亚洲国产精品国自产拍av秋霞| 黑人极品videos精品欧美裸| 亚洲综合久久久久| 先锋影音一区二区三区| 国产精品草草| av成人黄色| 亚洲一区欧美一区| 欧美性淫爽ww久久久久无| 一区二区三区成人| 午夜天堂精品久久久久| 国产精品久久久久高潮| 在线一区欧美| 午夜久久福利| 国产主播精品在线| 久久久久久伊人| 欧美激情网友自拍| 亚洲精品一区二区三区在线观看 | 一本色道久久综合亚洲精品不| 亚洲精品在线观看免费| 欧美大学生性色视频| 亚洲黄一区二区三区| 亚洲私人黄色宅男| 国产精品一区二区a| 欧美在线一二三区| 欧美成人一品| 一区二区三区免费网站| 国产精品毛片va一区二区三区| 亚洲欧美一级二级三级| 玖玖视频精品| 亚洲乱码国产乱码精品精天堂| 欧美乱妇高清无乱码| 亚洲视频大全| 久久综合伊人77777| 亚洲精品一级| 国产欧美日韩综合一区在线观看 | 99精品99| 久久久亚洲一区| 亚洲精品一区二区三区在线观看| 欧美日韩在线观看视频| 午夜精品久久久久久久白皮肤 | 午夜视频精品| 一区二区亚洲精品国产| 欧美日韩国产片| 欧美一区二区视频网站| 亚洲激情另类| 久久久久在线| 一区二区三区国产在线| 国产在线高清精品| 欧美成人激情视频| 亚洲欧美激情在线视频| 亚洲国产精品123| 欧美自拍偷拍午夜视频| 亚洲毛片一区二区| 国产永久精品大片wwwapp| 欧美激情va永久在线播放| 欧美一区二区三区四区视频| 亚洲区欧美区| 免费一级欧美片在线播放| 亚洲欧美日韩一区二区在线| 亚洲激情女人| 激情成人综合| 国产亚洲福利| 国产精品v欧美精品v日韩 | 亚洲主播在线观看| 亚洲日韩欧美视频一区| 你懂的成人av| 久久久久成人精品免费播放动漫| 亚洲午夜精品国产| 亚洲黄色av一区| 在线观看亚洲精品| 国产日韩欧美亚洲| 国产精品mv在线观看| 欧美激情区在线播放| 麻豆成人av| 久久久久女教师免费一区| 亚洲男人第一av网站| 亚洲娇小video精品| 欧美成人官网二区| 葵司免费一区二区三区四区五区| 性18欧美另类| 欧美一区二区三区免费大片| 亚洲视频一起| 亚洲在线观看视频网站| 亚洲一级电影| 一区二区三区免费网站| 一本色道88久久加勒比精品 | 好看的日韩视频| 娇妻被交换粗又大又硬视频欧美| 国产一区二区三区在线观看免费视频| 国产精品欧美精品| 国产午夜亚洲精品羞羞网站| 国产欧美一区二区三区视频 | 欧美女激情福利| 欧美日本一区| 国产精品久久中文| 国产女人18毛片水18精品| 国产亚洲精品aa| 亚洲高清不卡在线| 亚洲人成网在线播放| 亚洲性人人天天夜夜摸| 亚洲欧美久久久久一区二区三区| 新67194成人永久网站| 久久久亚洲人| 欧美成人午夜激情在线| 亚洲黄网站黄| 亚洲视频一起| 久久精品国产一区二区三区免费看| 欧美一区二区三区免费观看| 久久国产精品第一页| 久久综合久久综合久久| 欧美久久久久久久| 国产麻豆成人精品| 国产一区二区av| 亚洲毛片在线免费观看| 亚洲中字黄色| 欧美成人一区二区在线| aa国产精品| 久久久久久九九九九| 欧美日韩亚洲综合一区| 韩国女主播一区二区三区| 亚洲激情欧美| 欧美专区在线观看一区| 欧美激情中文不卡| 亚洲调教视频在线观看| 美女国内精品自产拍在线播放| 欧美午夜电影网| 在线观看三级视频欧美| 亚洲自拍电影| 欧美激情在线有限公司| 香港久久久电影| 欧美三级电影一区| 一区免费观看| 欧美一二三区在线观看| 亚洲国产欧美国产综合一区| 亚洲欧美日韩成人| 欧美另类人妖| 亚洲第一福利在线观看| 欧美在线亚洲在线| 日韩亚洲欧美一区| 久久婷婷影院|