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

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 閱讀(1679) 評論(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综合合色| 91久久精品www人人做人人爽| 欧美乱人伦中文字幕在线| 久久九九国产精品| 亚洲精品之草原avav久久| 国产婷婷色一区二区三区四区| 欧美经典一区二区| 国产精品mm| 国一区二区在线观看| 影音先锋日韩有码| 一本一本a久久| 午夜日韩激情| 欧美成人官网二区| 久久蜜桃资源一区二区老牛 | 国产精品一区二区男女羞羞无遮挡| 欧美日韩国产电影| 国产区欧美区日韩区| 在线看视频不卡| 亚洲欧美www| 亚洲国产一区在线观看| 亚洲成在线观看| 野花国产精品入口| 久久五月天婷婷| 国产欧美精品久久| 夜夜嗨av一区二区三区中文字幕| 欧美一级欧美一级在线播放| 欧美成人激情在线| 欧美中文在线观看国产| 欧美日一区二区在线观看 | 99国产精品久久久久久久| 欧美一级一区| 亚洲精品日本| 久久亚洲欧美| 国产日韩一区二区三区在线| 中文在线一区| 中文久久精品| 国产精品任我爽爆在线播放| 日韩视频中午一区| 亚洲日本无吗高清不卡| 你懂的亚洲视频| 亚洲精品三级| 一本久道久久久| 国产精自产拍久久久久久| 欧美一区三区二区在线观看| 亚洲一区国产| 伊人蜜桃色噜噜激情综合| 欧美电影在线| 欧美日韩国产一区| 亚洲欧美国产精品专区久久| 性色一区二区| 亚洲三级性片| 久久天天躁狠狠躁夜夜av| 欧美激情精品久久久久久大尺度| 久久中文久久字幕| 亚洲午夜久久久久久久久电影院 | 免费成人黄色片| 欧美成人免费网| 久久疯狂做爰流白浆xx| 久久综合九色| 国产婷婷色一区二区三区| 国产精品日韩欧美| 蜜桃久久精品乱码一区二区| 欧美日韩在线观看视频| 欧美第一黄色网| 欧美国产欧美综合| 一区二区免费看| 亚洲国产视频直播| 欧美在线视屏 | 亚洲另类在线视频| 久久九九国产精品怡红院| 亚洲免费视频一区二区| 欧美午夜视频一区二区| 亚洲素人一区二区| 欧美日韩一区精品| 9l国产精品久久久久麻豆| 一区二区国产精品| 欧美三级视频在线| 亚洲精选一区| 亚洲欧美日韩一区| 国产欧美日韩91| 午夜亚洲性色福利视频| 欧美一区观看| 亚洲第一在线| 欧美另类亚洲| 亚洲一区久久| 免费国产一区二区| 在线午夜精品| 国产一区二区三区高清| 久久久国产成人精品| 亚洲精品1区2区| 欧美在线免费观看视频| 亚洲成色www8888| 欧美午夜理伦三级在线观看| 中文欧美在线视频| 欧美国产日本| 久久久一二三| 亚洲伊人色欲综合网| 黄色成人免费网站| 国产精品国内视频| 欧美成人黑人xx视频免费观看| 亚洲视频在线观看视频| 国产一级一区二区| 毛片一区二区三区| 午夜精品久久久久久久99热浪潮| 日韩视频精品| 亚洲第一二三四五区| 久久久水蜜桃| 久久久综合精品| 久久电影一区| 欧美一区二区播放| 亚洲欧美日韩精品久久久| 日韩视频在线观看| 亚洲美女视频网| 一区二区三区精品视频在线观看| 亚洲高清不卡在线| 亚洲国产精品久久| 亚洲精品欧美极品| 91久久精品久久国产性色也91 | 欧美国产日韩xxxxx| 宅男66日本亚洲欧美视频| 亚洲第一综合天堂另类专| 久久久天天操| 老色鬼精品视频在线观看播放 | 国产亚洲毛片| 国产麻豆视频精品| 国产一区视频网站| 亚洲国产高清aⅴ视频| 亚洲欧洲中文日韩久久av乱码| 亚洲国产精品久久久久秋霞影院| 日韩午夜高潮| 亚洲欧美国产一区二区三区| 亚洲欧美影音先锋| 久久综合色播五月| 中文亚洲免费| 欧美不卡三区| 国内精品视频久久| 一本大道久久精品懂色aⅴ| 久久本道综合色狠狠五月| 久久综合亚州| 亚洲一级二级| 欧美成人免费网站| 亚洲综合视频在线| 久久夜色精品国产噜噜av| 欧美午夜精品久久久久久久| 一区二区三区在线不卡| 欧美一区二区视频在线观看| 亚洲欧洲另类| 性欧美大战久久久久久久免费观看 | 欧美日韩一区二区欧美激情| 亚洲电影在线| 久久亚洲精品一区| 欧美一区二区女人| 国产精自产拍久久久久久蜜| 欧美一区二视频| 亚洲一区二区在线| 国产视频一区在线观看一区免费| 亚洲午夜免费视频| 日韩亚洲精品在线| 国产精品午夜在线观看| 久久亚洲精品视频| 免费看av成人| 亚洲午夜91| 欧美亚洲免费高清在线观看| 国产精品入口66mio| 久久精品99无色码中文字幕| 久久精品欧美日韩| 日韩亚洲欧美中文三级| 亚洲视频在线观看免费| 国产精品自拍在线| 亚洲高清在线观看一区| 国产精品嫩草99a| 久久亚洲一区二区| 欧美精品在线极品| 亚洲欧美成人一区二区在线电影| 久久国产夜色精品鲁鲁99| 日韩一级成人av| 老鸭窝毛片一区二区三区| 亚洲欧美日韩成人高清在线一区| 久久久午夜电影| 欧美一区二区高清在线观看| 久久久久久久久久久久久久一区| 久久精品91久久久久久再现| 黄色一区二区三区四区| 一本色道久久综合亚洲二区三区| 国内精品一区二区三区| 一本久道久久综合中文字幕| 伊人狠狠色丁香综合尤物| 亚洲欧美在线网| 亚洲欧美一区二区在线观看| 欧美日韩精品免费观看视频| 久久人人超碰| 国内自拍亚洲| 男女精品网站| 亚洲欧洲日韩在线| 亚洲国产精品一区二区三区| 久久av在线| 欧美成人嫩草网站| 99国产精品久久久久老师| 欧美大片在线影院|