2016-12-09 18 views
2

MatlabコンパイラSDKによって生成されたC++共有ライブラリと統合されたC++コードがデプロイされました。 MatlabのコンパイラSDKは、変数XAPPLRESDIR環境を追加し、Matlab_runtime MCR 2.編集し& LD_LIBRARY_PATHをreadme.txtを開き、ホームディレクトリとgeditの〜/ .bashrcのファイルに従って、ライブラリのリンクパスをインストールtest.h, test.so, and readme.txtMatlabコンパイラSDKで生成されたC++共有ライブラリへのリンク

  1. 含むフォルダを生成しましたREADME.TXT 3に従ってファイルには、ドライバのコードを書くmain.cppにし、main.cppにコードの使用をコンパイルします

g++ -L/home/yuan/Documents/Matlab2016b/Matlab_runtime/v91/extern/lib/glnxa64

-L/home/yuan/Documents/Matlab2016b/Matlab_runtime/v91/bin/glnxa64

-I/home/yuan/Documents/Matlab2016b/Matlab_runtime/v91/extern/include

-L./test main.cpp -o main

と私はエラーを得た:

/tmp/cc3Xemzh.o: In function main: main.cpp:(.text+0xa): undefined reference to mclmcrInitialize_proxy

main.cpp:(.text+0x19): undefined reference to mclInitializeApplication_860_proxy

main.cpp:(.text+0x48): undefined reference to testInitialize

main.cpp:(.text+0x77): undefined reference to mlfTest

main.cpp:(.text+0x98): undefined reference to testTerminate

main.cpp:(.text+0x9d): undefined reference to `mclTerminateApplication_proxy

collect2: error: ld returned 1 exit status

これはリンクライブラリの問題であるはずですが、これを修正する方法はわかりませんが、誰でも手伝うことができますか?

答えて

関連する問題