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

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 閱讀(1684) 評論(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精品亚洲| 亚洲午夜极品| 久久中文精品| 久久久久成人精品免费播放动漫| 国产欧美一级| 久久蜜臀精品av| 免费不卡欧美自拍视频| 亚洲精品视频在线观看网站| 亚洲欧洲精品一区二区三区| 欧美日韩国产免费观看| 亚洲一区二区三区免费观看| 亚洲一区二区伦理| 红桃视频国产一区| 亚洲国产一二三| 国产精品色婷婷久久58| 久久亚洲春色中文字幕| 欧美国产三级| 欧美资源在线观看| 久久在线免费视频| 亚洲制服av| 久久综合久久综合这里只有精品 | 久久成人这里只有精品| 亚洲国产精品免费| 一区二区毛片| 亚洲国产国产亚洲一二三| 日韩一级不卡| 一区二区在线观看视频| 99精品欧美| 亚洲国产精品一区二区www在线 | 亚洲精品久久久一区二区三区| 国产精品黄视频| 欧美91大片| 国产精品亚洲激情| 亚洲国产一区二区三区高清 | 久久xxxx精品视频| 亚洲看片一区| 欧美在线观看一区二区| 99精品热视频只有精品10| 欧美一区观看| 亚洲综合丁香| 欧美区在线观看| 久久一区二区三区四区五区| 国产精品高精视频免费| 欧美韩日精品| 一区二区在线看| 亚洲欧美日韩国产精品| 在线视频日韩精品| 欧美二区乱c少妇| 久久婷婷成人综合色| 国产老肥熟一区二区三区| 日韩视频在线一区| 亚洲精品四区| 欧美va亚洲va国产综合| 久久人人爽爽爽人久久久| 国产精品青草久久| 一区二区国产日产| 国产精品99久久久久久人| 欧美va天堂在线| 欧美高清一区| 91久久久久久| 欧美顶级大胆免费视频| 欧美成人一区二区三区片免费| 好看的日韩av电影| 久久精品女人的天堂av| 久久精品视频在线看| 国产情侣一区| 欧美影院在线播放| 麻豆91精品| 亚洲国产成人久久综合一区| 久热成人在线视频| 欧美黑人在线播放| 亚洲精品视频在线观看免费| 欧美风情在线| 99国产精品国产精品毛片| 亚洲免费一在线| 国产日本欧美一区二区三区| 小处雏高清一区二区三区| 欧美专区第一页| 激情综合自拍| 免费观看30秒视频久久| 亚洲欧洲日本mm| 亚洲一区二区在线免费观看视频| 国产精品高潮呻吟久久av无限| 亚洲视频免费在线| 久久精彩免费视频| 亚洲国产欧美另类丝袜| 欧美另类专区| 亚洲欧美日韩国产综合在线 | 久久精品国产综合精品| 国产在线精品二区| 久热精品视频在线免费观看| 91久久嫩草影院一区二区| 亚洲午夜电影网| 国产亚洲欧美日韩日本| 理论片一区二区在线| 亚洲美女黄网| 久久久欧美精品| 日韩午夜电影在线观看| 国产精品高精视频免费| 久久久久久日产精品| 日韩视频免费在线| 美国成人直播| 99国产精品久久久久久久久久| 国产精品视频网站| 欧美成人精品影院| 午夜久久久久久| 亚洲人成网站在线播| 久久久91精品国产一区二区三区 | 亚洲专区在线视频| 在线播放不卡| 国产美女精品免费电影| 欧美精品自拍| 久久精品99| 亚洲一区二区三区乱码aⅴ蜜桃女| 美女视频黄a大片欧美| 亚洲欧美日韩精品久久亚洲区 | 国产欧美日韩综合一区在线播放 | 欧美手机在线| 欧美国产日韩一区二区三区| 小嫩嫩精品导航| 制服丝袜激情欧洲亚洲| 亚洲国产视频一区二区| 久久久欧美一区二区| 午夜在线精品偷拍| 一本色道久久精品| 亚洲日本中文字幕| 在线观看久久av| 国产一级一区二区| 国产情侣久久| 国产精品视频一| 国产精品九九久久久久久久| 欧美日韩成人综合| 欧美另类视频| 欧美国产日韩xxxxx| 女女同性女同一区二区三区91| 久久久久久婷| 久久在线免费| 免费欧美视频| 免费av成人在线| 免费一区视频| 欧美多人爱爱视频网站| 欧美成人精品1314www| 麻豆精品91| 欧美经典一区二区| 欧美精品啪啪| 国产精品a久久久久久| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ入口 | 你懂的视频一区二区| 麻豆成人在线| 欧美激情精品久久久久| 亚洲成色精品| 亚洲精品日韩在线观看| 亚洲美女性视频| 亚洲制服av| 欧美伊人久久大香线蕉综合69| 久久国产99| 欧美成人一区二免费视频软件| 欧美绝品在线观看成人午夜影视| 欧美另类久久久品| 国产精品久久久久毛片大屁完整版| 国产精品久久中文| 国产主播精品在线| 亚洲国产精品嫩草影院| 99国产精品国产精品毛片| 亚洲综合另类| 久久亚洲午夜电影| 91久久国产综合久久| 一区二区三区欧美视频| 欧美一乱一性一交一视频| 久久精品最新地址| 欧美日韩国产专区| 国内精品美女av在线播放| 亚洲精品国产精品国自产观看| 亚洲专区一区| 美女91精品| 在线天堂一区av电影| 久久久久国色av免费看影院| 欧美高清不卡在线| 国产视频一区欧美| 亚洲另类视频| 久久精品人人做人人爽电影蜜月| 欧美激情一二三区| 亚洲欧洲99久久| 欧美精品少妇一区二区三区| 国产日韩欧美精品一区| 亚洲精品久久久久久下一站 | 亚洲欧美精品一区| 欧美电影免费观看高清完整版| 国产精品系列在线播放| 亚洲国产一区二区三区高清| 欧美一级精品大片| 亚洲精品国产精品国自产在线| 性欧美激情精品| 欧美视频免费在线| 亚洲国产精品美女| 久久免费精品日本久久中文字幕| 亚洲美女免费视频| 欧美成人午夜剧场免费观看| 国产一区二区日韩| 亚洲欧美另类中文字幕|