第乙個ACE測試例子

2021-05-02 03:54:29 字數 2150 閱讀 4941

第乙個ace測試例子

下面的乙個測試例子在linux和windows下均通過,**無需改動,只需重新編譯就可達到跨平台執行。從乙個側面反應了ace在可移植性上的魅力。

ace 版本:5.6

編譯環境 :

linux version 2.6.18-4-686 (debian 2.6.18.dfsg.1-12)

gcc version 4.1.2 20061115

//原始碼 :welcome.cpp

#include

"ace/os.h"

#include

"ace/log_msg.h"

intmain

(intargc

,char*

argv)

ace_time_value

time

=ace_os

::gettimeofday

();

ace_time_value

timer1

=time

+ace_time_value

(ace_os

::atoi

(argv[1

]));

ace_time_value

timer2

=time

+ace_time_value

(ace_os

::atoi

(argv[2

]));

if(

timer1

>

timer2)

ace_debug

((lm_debug

,"timer 1 is greater/n"

));

elseif(

timer2

>

timer1)

ace_debug

((lm_debug

,"timer 2 is greater/n"

));

else

ace_debug

((lm_debug

,"timers are equal/n"

));

ace_os

::exit(1

); return0;

}編譯:

$ g++ -o wel -lace welcome.cpp

執行:

$ ./wel 20 10 

結果:

(6232|3081746112)==hello,this is a program about ace_timer_value!

timer 1 is greater

測試環境:

$ cat /proc/version

linux version 2.6.18-4-686 (debian 2.6.18.dfsg.1-12) ([email protected]) (gcc version 4.1.2 20061115 (prerelease) (debian 4.1.1-21)) #1 smp mon mar 26 17:17:36 utc 2007

在windows下也同樣可以通過編譯。

測試環境:windows xp | vs2005

windows下需要注意的一點是:

在專案的設定上:解決方案資源管理器->具體方案右鍵->屬性->配置屬性->鏈結器->輸入->附加依賴項,添入aced.lib。

上面兩個測試的前提是,ace庫均在系統下編譯成功。

Siebel 第乙個測試例子

在安裝了環境後,也做了本地資料庫後.就可以開始第乙個例子了.1.首先確認你要在哪個webclient進行開發 如 siebel ecommunications,siebel loyalty,siebel financial services 2.新建乙個project.4.新建bc,選上你的tabl...

第乙個Authorware例子

對於flash和authorware兩個軟體,開始的時候自認為flash的作品短小精悍,有利於網路傳播,所以關注的比較多 但是現在發現authorware對於課件製作方面有獨特的優勢 方便!下面是乙個authorware製作時鐘的例子 1 調整視窗 resizewindow 300,300 2 畫表...

第乙個入門例子

1 配置thinkphp 2 嘗試控制器和檢視 1 資料庫 在開始之前,我們首先在資料庫thinkphp中建立乙個think data資料表 以mysql資料庫為例 create table if not exists think data id int 8 unsigned not null au...