Re: [問題] linux中使用.def
剛剛試了一下,至少試到可以編譯成功了...XD
其實在 Linux 底下,你要使用的不是那個 def 檔
我的步驟如下:
1. 下載 http://modis.ispras.ru/sedna/download.html 裡
sedna-3.4.66-bin-linux-x86.sh 這個檔案至 ~/ (你的家目錄下)
2. 執行 sh ~/sedna-3.4.66-bin-linux-x86.sh,螢幕會出現
This program will extract and install Sedna XML DBMS.
Where do you want to install the "sedna" directory tree?
1 - /usr/local
2 - /opt
3 - $HOME (/home/帳號) [default]
4 - . (here)
Or enter a different directory (prefix) to install in.
>
就按 3 然後 enter
3. 畫面會停在 (default: skip links) > 這行,按 Enter 就會繼續
4. 應該會看到 ALL DONE 與 See file /home/帳號/sedna/README to get started
這樣的字樣,代表安裝好了
5. 執行 cd ~/sedna/driver/c/
6. 把 http://modis.ispras.ru/sedna/progguide/ProgGuidesu2.html#x5-180001.2.8
這隻範例程式,貼到一個叫做 test.c 的檔案裡
注意1: 網頁程式碼有一行 buf[bytes_read] = ’\0’;
要改成 buf[bytes_read] = '\0'; 也就是單引號要修正
注意2: 第四行 int handle_error(SednaConnection* conn,
改成 int handle_error(struct SednaConnection* conn,
7. 執行 gcc test.c libsedna.a
其中 libsedna.a 是原本就放置在 ~/sedna/driver/c/ 的檔案
8. 在 ~/sedna/driver/c/ 會出現一個 a.out,它就是 test.c 編譯後的執行檔
請輸入 ./a.out 執行程式
9. 你會發現程式執行錯誤 XD 這就是你要研究的部份了
目前我所知道的,在執行 ./a.out 之前,要依序執行以下指令:
(1) ~/sedna/bin/se_gov
(2) ~/sedna/bin/se_cdb test_db
(3) ~/sedna/bin/se_sm test_db
/* 參考資料 http://modis.ispras.ru/sedna/quick-start.html */
不過就算這樣,程式執行仍然會有問題,這就留給你去研究囉 XD
--
我剛剛一直想要按 :wq 存檔.......
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.171.46
※ 編輯: james732 來自: 140.117.171.46 (03/30 00:09)
推
03/30 00:14, , 1F
03/30 00:14, 1F
推
03/30 01:27, , 2F
03/30 01:27, 2F
→
03/30 01:28, , 3F
03/30 01:28, 3F
→
03/31 01:11, , 4F
03/31 01:11, 4F
→
03/31 01:13, , 5F
03/31 01:13, 5F
可以的話vi還是學一下,其實不會很困難的,鳥哥那邊的說明非常詳細~XD
※ 編輯: james732 來自: 140.117.171.46 (03/31 01:14)
→
03/31 12:19, , 6F
03/31 12:19, 6F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):