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

EverSpring working shop

To pursue creative ideas based on nature.

統(tǒng)計

留言簿(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!  回復(fù)  更多評論   

# 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!  回復(fù)  更多評論   

# 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  回復(fù)  更多評論   

# 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.  回復(fù)  更多評論   

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            日韩视频精品在线| 亚洲靠逼com| 久久精品九九| 欧美亚洲综合久久| 韩日在线一区| 欧美高清视频一区二区三区在线观看| 久久一区欧美| 亚洲免费观看在线观看| 一区二区三区欧美| 国产日韩欧美不卡| 免费一级欧美在线大片| 欧美精品成人| 欧美在线播放视频| 久久裸体艺术| 一区二区三区色| 欧美亚洲一级| 亚洲日本电影在线| 亚洲一区二区免费在线| 国产亚洲成精品久久| 亚洲成人资源网| 欧美日韩日本国产亚洲在线| 久久精品男女| 欧美日韩精品在线播放| 久久av一区| 欧美激情自拍| 欧美福利视频网站| 亚洲国产欧美日韩精品| 亚洲与欧洲av电影| 亚洲国产精品久久久久秋霞不卡| 亚洲精品久久久久久久久久久久久| 国产精品美女999| 欧美成人a视频| 国产精品视频99| 欧美激情网站在线观看| 国产精品丝袜xxxxxxx| 欧美高清自拍一区| 国产亚洲第一区| 亚洲精品中文字幕女同| 国产亚洲二区| 亚洲色图在线视频| 亚洲精品小视频在线观看| 亚洲欧美日韩国产综合精品二区| 亚洲伦理久久| 久久亚洲精品中文字幕冲田杏梨| 性做久久久久久| 欧美日本视频在线| 欧美黄色免费| 影音先锋久久资源网| 亚洲欧美日韩天堂一区二区| 中文久久乱码一区二区| 农村妇女精品| 麻豆久久婷婷| 国产午夜精品久久久久久久| 国内精品久久久久影院 日本资源| 亚洲欧洲在线一区| 亚洲国产毛片完整版 | 亚洲精品视频在线看| 欧美一区影院| 久久精品30| 国产亚洲精品aa| 性色av一区二区怡红| 午夜一区二区三区在线观看 | 久久久久国产精品麻豆ai换脸| 欧美亚洲专区| 国产日韩三区| 亚洲综合色网站| 销魂美女一区二区三区视频在线| 国产精品jizz在线观看美国| 一本色道久久综合精品竹菊| 亚洲主播在线| 国产日本欧美一区二区三区在线 | 欧美激情视频网站| 亚洲精品偷拍| 欧美视频国产精品| 亚洲午夜精品一区二区| 欧美一区在线看| 国产亚洲毛片| 久久久久88色偷偷免费| 欧美激情女人20p| 9i看片成人免费高清| 欧美小视频在线| 亚洲欧美色婷婷| 久久综合婷婷| 日韩视频久久| 国产精品永久免费在线| 久久国产手机看片| 亚洲黄色在线视频| 午夜在线a亚洲v天堂网2018| 国产一区二区观看| 欧美不卡高清| 一区二区三区视频在线| 久久久高清一区二区三区| 亚洲国产婷婷香蕉久久久久久99| 欧美伦理a级免费电影| 亚洲一区二区三区免费在线观看| 久久人人看视频| 亚洲九九精品| 国产女精品视频网站免费 | 久久久亚洲影院你懂的| 亚洲精品一区在线观看香蕉| 欧美一区激情视频在线观看| 在线观看欧美亚洲| 国产精品国产a| 美女脱光内衣内裤视频久久网站| 夜夜精品视频一区二区| 免费av成人在线| 亚洲午夜久久久久久久久电影院 | 91久久精品美女| 国产精一区二区三区| 欧美a级片网站| 欧美一区二区三区在线观看| 亚洲精品美女在线观看| 久久伊人一区二区| 午夜精品一区二区三区在线| 亚洲精品国产无天堂网2021| 国产一区在线观看视频| 欧美三级在线| 欧美精品一区二区三区视频| 亚洲一区欧美二区| 亚洲国产高清自拍| 久久成人资源| 亚洲午夜极品| 日韩亚洲视频| 亚洲精品乱码久久久久久久久| 国产一区二区三区久久悠悠色av | 亚洲午夜精品国产| 日韩午夜在线电影| 欧美激情小视频| 媚黑女一区二区| 久久久777| 欧美一级视频精品观看| 亚洲综合大片69999| 一区二区三欧美| 最近看过的日韩成人| 在线观看福利一区| 伊人久久综合| 精品成人一区| 伊人天天综合| 激情小说另类小说亚洲欧美| 国产有码一区二区| 国产午夜精品在线| 国产亚洲欧美色| 国内精品美女av在线播放| 国产日韩欧美日韩大片| 国产精品自拍在线| 国产亚洲人成网站在线观看| 国产日韩欧美91| 国内自拍一区| 在线电影国产精品| 91久久久亚洲精品| 亚洲精品国久久99热| 99热精品在线| 亚洲在线观看免费视频| 午夜精品久久久久| 欧美综合77777色婷婷| 久久天天躁狠狠躁夜夜爽蜜月| 久久亚洲国产精品日日av夜夜| 久久综合99re88久久爱| 免费观看成人| 亚洲日本欧美日韩高观看| 一二三四社区欧美黄| 亚洲欧美日韩在线播放| 欧美一区二区精品| 老牛嫩草一区二区三区日本| 欧美国产欧美亚洲国产日韩mv天天看完整 | 久久综合激情| 亚洲第一二三四五区| 亚洲免费播放| 午夜在线一区二区| 久久女同精品一区二区| 欧美日韩国产色综合一二三四| 国产精品久久激情| 在线精品亚洲| 亚洲视频图片小说| 久久婷婷一区| 亚洲美女av在线播放| 欧美一区二区黄色| 欧美国产欧美亚洲国产日韩mv天天看完整 | 久久久久久久一区二区三区| 欧美电影在线观看| 国产精品99久久久久久久久 | 亚洲免费大片| 久久久久久久97| 欧美性大战久久久久久久蜜臀| 国内精品国产成人| 在线中文字幕日韩| 免费日韩av| 一区二区精品国产| 男女激情视频一区| 国产欧美一区二区精品秋霞影院| 亚洲欧洲一区二区三区| 久久精品一区| 一区二区三区视频在线观看| 麻豆精品网站| 国内精品久久久久久久影视麻豆| 亚洲婷婷在线| 亚洲国产精品久久久久婷婷884| 欧美一区观看| 国产精品高清网站| 99日韩精品|