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

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| 亚洲视频 欧洲视频| 久久精品视频在线看| 亚洲欧美日韩天堂| 欧美新色视频| 先锋影音网一区二区| 午夜久久资源| 狠狠色狠狠色综合人人| 美女视频黄免费的久久| 免费观看日韩av| 中文网丁香综合网| 亚洲欧美日韩一区二区在线 | 久久精品最新地址| 亚洲国产精品日韩| 亚洲精品中文字幕在线| 国产精品免费aⅴ片在线观看| 欧美在线你懂的| 久久三级视频| 亚洲网站在线播放| 欧美一区二区三区四区在线观看 | 亚洲日本在线观看| 日韩午夜av电影| 国产亚洲福利一区| 亚洲国产欧美一区| 欧美午夜精品久久久久久孕妇| 欧美在线视频一区| 欧美成人亚洲| 欧美一区激情视频在线观看| 久久尤物电影视频在线观看| 亚洲视频精选在线| 久久久亚洲欧洲日产国码αv| 妖精成人www高清在线观看| 午夜综合激情| 日韩网站在线| 久久久福利视频| 国产精品99久久久久久久久久久久| 性感少妇一区| 亚洲欧美韩国| 欧美国产日韩亚洲一区| 久久视频这里只有精品| 欧美午夜精品久久久久久久| 亚洲国产高清高潮精品美女| 狠狠色狠狠色综合| 午夜亚洲性色福利视频| 亚洲视频你懂的| 免费日韩av| 久热精品视频在线观看一区| 国产精品日韩精品| 一本色道久久综合亚洲精品不| 在线播放豆国产99亚洲| 性高湖久久久久久久久| 小处雏高清一区二区三区| 欧美日韩免费一区| 亚洲国产精品免费| 在线播放不卡| 欧美一区2区视频在线观看 | 久久久噜噜噜久久中文字幕色伊伊 | 亚洲黄色免费| 国产亚洲一区在线播放| 日韩午夜在线视频| 最新日韩av| 久久久久久久综合| 亚洲精品中文字| 亚洲一二区在线| 一区二区三区福利| 欧美国产精品va在线观看| 久久亚洲高清| 国产亚洲欧美日韩日本| 中文一区二区| 亚洲调教视频在线观看| 欧美精品在线免费观看| 欧美激情一区二区三区在线视频| 国产一区 二区 三区一级| 亚洲欧美日韩精品久久| 亚洲欧美成人一区二区三区| 欧美日韩在线观看一区二区| 久久精品国产亚洲5555| 欧美激情一区二区| 亚洲国产视频一区| 日韩亚洲欧美一区二区三区| 老牛嫩草一区二区三区日本| 欧美一区二区三区在线| 国产精品视频免费在线观看| 亚洲午夜精品久久久久久浪潮| 亚洲婷婷在线| 国产日韩欧美黄色| 西瓜成人精品人成网站| 久久久久国产精品一区二区| 国产一区二区三区久久久| 一区二区三区国产盗摄| 亚洲精品一区中文| 久久色在线播放| 欧美激情亚洲激情| 一区二区三区日韩欧美精品| 欧美视频在线一区| 午夜视频在线观看一区二区| 久久资源av| 亚洲日本一区二区| 久久色在线播放| 久久精品综合一区| 伊人精品久久久久7777| 欧美不卡视频一区| 一区二区黄色| 久久精品夜夜夜夜久久| 亚洲第一色在线| 欧美日韩免费一区| 欧美一区二区三区四区在线观看 | 欧美四级伦理在线| 欧美在线免费看| 亚洲免费观看高清在线观看| 欧美特黄一级| 一本色道88久久加勒比精品| 开心色5月久久精品| 日韩一级在线观看| 国产欧美日韩| 欧美激情一区二区三区高清视频| 一本久道综合久久精品| 麻豆久久久9性大片| 在线视频免费在线观看一区二区| 国产精品第13页| 老司机精品视频网站| 欧美成人在线免费视频| 午夜在线播放视频欧美| 欧美日韩国产页| 久久国产精品99国产精| 亚洲激情av在线| 久久国产精品第一页| 99综合在线| 精品成人在线观看| 国产精品久久久久久户外露出 | 欧美成人在线免费观看| 欧美一区二区高清在线观看| 亚洲精品久久7777| 国产婷婷色一区二区三区在线| 欧美亚洲在线| 一区电影在线观看| 亚洲国产欧美在线| 久久久久久久综合日本| 亚洲综合色丁香婷婷六月图片| 亚洲国产专区| 伊人精品在线| 国产精品乱子乱xxxx| 欧美日韩一级片在线观看| 久久免费视频这里只有精品| 野花国产精品入口| 亚洲激情社区| 亚洲电影免费在线| 美女黄色成人网| 亚洲免费综合| 国产婷婷色综合av蜜臀av | 亚洲直播在线一区| 亚洲乱码国产乱码精品精可以看| 国产欧美日韩在线 | 欧美成人四级电影| 久久精品电影| 久久精品国产免费| 夜夜精品视频| 国产亚洲亚洲| 国产欧美日韩在线视频| 国产精品无码专区在线观看| 国产精品久久久久久一区二区三区| 欧美日韩国产成人在线观看 | 日韩亚洲欧美一区| 美女主播视频一区| 午夜精品国产| 欧美一级片一区| 亚洲欧美日韩国产一区二区三区| 亚洲天堂av综合网| 欧美一区二区三区四区夜夜大片| 欧美在线精品免播放器视频| 久久精品综合| 久久女同精品一区二区| 免费日本视频一区| 亚洲人成人77777线观看| 亚洲免费久久| 亚洲国产精品精华液2区45| 一本色道久久综合亚洲精品小说 | 亚洲精选在线| 亚洲免费视频成人| 欧美一区深夜视频| 欧美国产亚洲视频| 久久久久久穴| 亚洲人成人77777线观看| 亚洲国产精品久久久久秋霞影院 | 国产精品热久久久久夜色精品三区| 国产一级一区二区| 亚洲久久一区| 欧美一区二区三区四区在线| 另类春色校园亚洲| 亚洲美女精品久久| 欧美成人亚洲| 亚洲综合导航| 蜜桃久久av一区| 国产精品女人毛片| 国产精品丝袜91| 精品91视频| 91久久精品日日躁夜夜躁国产| 在线一区二区日韩| 久久中文精品| 亚洲永久免费av|