運行create_xml.c時遇到的問題

來源:互聯網
上載者:User

標籤:

 1 運行create_xml.c時遇到的問題 2  3 [email protected]:~/Desktop/mxml-2.9$ ./configure --enable-threads 4 [email protected]:~/Desktop/mxml-2.9$ make 5 [email protected]:~/Desktop/mxml-2.9$ sudo make install 6 //依照以前的經驗,要開啟多線程的支援,編譯,安裝 7  8  9 10 [email protected]:~/Desktop/project_xml_mysql$ ls -l11 total 812 -rw-rw-r-- 1 jason jason 1447 Sep 15 02:41 create_xml.c13 -rw-rw-r-- 1 jason jason 1369 Sep 15 02:34 create_xml.c~14 //編寫原始碼15 [email protected]:~/Desktop/project_xml_mysql$ gcc -o create_xml create_xml.c -lmxml16 //usr/local/lib/libmxml.so: undefined reference to `pthread_getspecific‘17 //usr/local/lib/libmxml.so: undefined reference to `pthread_key_create‘18 //usr/local/lib/libmxml.so: undefined reference to `pthread_once‘19 //usr/local/lib/libmxml.so: undefined reference to `pthread_setspecific‘20 //usr/local/lib/libmxml.so: undefined reference to `pthread_key_delete‘21 collect2: error: ld returned 1 exit status22 //可以看出是沒有多線程的支援23 [email protected]:~/Desktop/project_xml_mysql$ gcc -o create_xml create_xml.c -lmxml -lpthread24 [email protected]:~/Desktop/project_xml_mysql$ ls25 create_xml  create_xml.c  create_xml.c~26 //這樣可以得到可執行檔27 [email protected]:~/Desktop/project_xml_mysql$ ./create_xml 28 ./create_xml: error while loading shared libraries: libmxml.so.1: cannot open shared object file: No such file or directory29 //啟動並執行時候出現了另外的一個問題30 //參考文獻:http://blog.csdn.net/dikcychen2011/article/details/976578731 [email protected]:~/Desktop/project_xml_mysql$ cat /etc/ld.so.conf32 include /etc/ld.so.conf.d/*.conf33 [email protected]:/etc$ sudo vi ld.so.conf34 [email protected]:/etc$ cat ld.so.conf35 include /etc/ld.so.conf.d/*.conf36 include /usr/local/lib37 //安裝上面的步驟改變etc下面的那個檔案38 [email protected]:/etc$ cd ~/Desktop/project_xml_mysql/39 [email protected]:~/Desktop/project_xml_mysql$ ls40 create_xml  create_xml.c  create_xml.c~41 [email protected]:~/Desktop/project_xml_mysql$ sudo ./create_xml 42 ./create_xml: error while loading shared libraries: libmxml.so.1: cannot open shared object file: No such file or directory43 [email protected]:~/Desktop/project_xml_mysql$ ldconfig44 /sbin/ldconfig.real: Can‘t create temporary cache file /etc/ld.so.cache~: Permission denied45 [email protected]:~/Desktop/project_xml_mysql$ sudo ldconfig46 //這個ldconfig是使得配置使能47 [email protected]:~/Desktop/project_xml_mysql$ sudo ./create_xml 48 [email protected]:~/Desktop/project_xml_mysql$ ls49 create_xml  create_xml.c  create_xml.c~  creat_new_check.xml50 //運行之後產生新的xml檔案51 [email protected]:~/Desktop/project_xml_mysql$ cat creat_new_check.xml 52 <?xml version="1.0" encoding="utf-8"?><data><node>val1</node><node>val2</node><node>val3</node><group><node>val4</node><node>val5</node><node>val6</node></group><node>val7</node><node>val8</node></data>

 

運行create_xml.c時遇到的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.