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

EverSpring working shop

To pursue creative ideas based on nature.

統(tǒng)計(jì)

留言簿(1)

他山之石

閱讀排行榜

評(píng)論排行榜

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) 評(píng)論(4)  編輯 收藏 引用 所屬分類: Notes

評(píng)論

# 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ù)  更多評(píng)論   

# 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ù)  更多評(píng)論   

# 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ù)  更多評(píng)論   

# re: How to Compile/Test Loki source code in Linux[未登錄](méi) 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ù)  更多評(píng)論   

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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 | 午夜久久福利| 亚洲午夜精品网| 日韩一二在线观看| 一级成人国产| 国产精品色午夜在线观看| 亚洲欧美美女| 欧美一区二区三区视频| 在线播放豆国产99亚洲| 欧美电影打屁股sp| 欧美成人四级电影| 亚洲理伦电影| 欧美夫妇交换俱乐部在线观看| 99这里只有精品| 亚洲香蕉伊综合在人在线视看| 日韩一区二区精品在线观看| 欧美大胆人体视频| 亚洲经典自拍| 国产精品久久久久9999| 亚洲色图制服丝袜| 在线观看亚洲专区| 99pao成人国产永久免费视频| 国产精品久久久亚洲一区 | 国产一区二区三区免费在线观看| 亚洲在线第一页| 亚洲精品小视频| 亚洲欧美成人网| 久久三级视频| 日韩视频在线播放| 欧美极品一区二区三区| 香蕉av福利精品导航| 久久激情久久| 欧美成人久久| 亚洲全黄一级网站| 国产亚洲视频在线| 欧美一区二区在线播放| 麻豆久久久9性大片| 国产精品v欧美精品v日韩精品| 久久精品在这里| 激情综合亚洲| 在线视频日韩| 久久精品国产69国产精品亚洲 | 亚洲精品久久嫩草网站秘色 | 欧美自拍偷拍午夜视频| 欧美精品一区二区三| 久久精品综合| 亚洲国产成人av在线| 欧美一区二视频| 欧美国产日韩精品| 黄色日韩网站视频| 亚洲欧美日韩精品一区二区| 久久日韩粉嫩一区二区三区| 国产精品一区二区久久| 一本色道久久综合一区| 久久精品夜色噜噜亚洲a∨| 在线观看日韩av| 欧美日韩视频第一区| 欧美电影免费观看| 亚洲欧美日韩国产精品| 在线观看亚洲a| 国产精品v欧美精品v日韩| 久久久噜噜噜久噜久久| 久久综合色婷婷| 亚洲视频在线播放| 欧美黄色一区| 欧美在线观看视频| 一本色道88久久加勒比精品| 久久综合九色综合久99| 狠狠色丁香久久婷婷综合_中| 欧美黑人在线观看| 久久精品夜色噜噜亚洲aⅴ | 香蕉国产精品偷在线观看不卡| 伊人精品视频| 国产乱码精品一区二区三区忘忧草| 免费观看久久久4p| 欧美激情一区二区三区全黄 | 亚洲一区在线观看视频| 欧美午夜不卡影院在线观看完整版免费| 欧美专区亚洲专区| 亚洲少妇自拍| 亚洲精品美女在线观看| 免费观看日韩av| 久久久精品欧美丰满| 亚洲女同同性videoxma| 日韩视频一区二区在线观看| 亚洲高清在线视频| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品一区二区久久国产| 欧美日韩免费一区二区三区视频 | 久久久噜噜噜| 香蕉久久一区二区不卡无毒影院 | 亚洲免费观看| 亚洲人成毛片在线播放| 亚洲成在线观看| 亚洲网站视频| 这里只有精品电影| 亚洲青色在线| 亚洲激情专区| 亚洲黄色大片| 欧美在线观看一二区| 久久九九国产精品| 欧美一区二区免费观在线| 亚洲一区二区视频在线观看| 一区二区三区四区五区视频| 亚洲美女中出| 99在线热播精品免费| 欧美在线一二三| 亚洲免费在线视频一区 二区| 亚洲一区二区三区中文字幕| 亚洲免费成人av电影| 99riav1国产精品视频| 99ri日韩精品视频| 亚洲在线电影| 久久www成人_看片免费不卡| 久久国产直播| 免费视频一区| 亚洲人体1000| 一区二区不卡在线视频 午夜欧美不卡在 | 亚洲破处大片| 亚洲深夜激情| 午夜精品福利在线观看| 久久精品视频在线免费观看| 久久久综合香蕉尹人综合网| 欧美黄色免费| a4yy欧美一区二区三区| 亚洲欧美综合精品久久成人| 久久久久久久久久久久久女国产乱| 久久综合九色综合欧美就去吻| 一区二区三区日韩精品视频| 亚洲欧美怡红院| 老司机午夜精品| 欧美日韩国产天堂| 欧美高清视频www夜色资源网| 欧美日韩在线播放一区| 国产美女搞久久| 亚洲黄色在线观看| 久久视频在线看| 欧美日韩美女一区二区| 国产日本欧美一区二区| 国产精品成人观看视频免费| 国产在线播精品第三| 国产精品一区一区三区| 亚洲国产电影| 午夜精品视频一区| 欧美激情成人在线| 午夜精品视频在线| 午夜精品在线观看| 欧美猛交免费看| 久久精品日韩欧美| 欧美日韩一区二区在线| 亚洲第一福利在线观看| 亚洲欧美日韩一区二区在线| 欧美成人综合网站| 午夜精品视频| 国产精品久久精品日日| 亚洲国产精品小视频| 久久精品99国产精品| 日韩视频二区| 欧美成人一区二区| 在线观看日韩欧美| 久久激情久久| 亚洲欧美国产77777| 亚洲福利视频网| 久久精品在线| 国产欧美日韩精品丝袜高跟鞋 | 美女久久一区| 女同性一区二区三区人了人一| 国产精品一区二区三区久久久| 99日韩精品| 亚洲第一网站| 免播放器亚洲一区| 久久精品视频在线免费观看| 国产欧美亚洲精品| 性做久久久久久久久| 一区二区欧美精品| 欧美日韩国产一级片| 亚洲美女精品久久| 亚洲国产人成综合网站| 欧美 日韩 国产精品免费观看| 一区二区三区在线观看视频| 久久精品成人| 欧美亚洲视频| 国产综合色在线视频区| 久久精品亚洲一区二区三区浴池| 亚洲字幕一区二区| 国产欧美日韩91| 国产一区日韩一区| 久久男人av资源网站| 久久久久久久波多野高潮日日 | 久久久久久久久久久久久9999| 亚洲男人的天堂在线aⅴ视频|