1

Ubuntuの下でNetbeans c ++(7.3)でICU-Timezone APIを使用しようとしています。

ICU のライブラリとインクルード ディレクトリを追加しました。

次に、この簡単なサンプル コードを実行します。

#include <ctime>
#include <stdlib.h>
#include <stdio.h>
#include "DateFormats.h"
#include "NumberFormats.h"
#include <time.h>
#include <unistd.h>
#include <getopt.h>
#include <timezone.h>
using namespace std;

int main(int argc, char **argv) {
    cout<<"hello"<<endl;
    TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles");  
}

エラーが発生します

/home/ubuntu/NetBeansProjects/DFC/dist/Debug/GNU-Linux-x86/dfc: 共有ライブラリのロード中にエラーが発生しました: libicuuc.so.50: 共有オブジェクトファイルを開けません: そのようなファイルまたはディレクトリはありません

あなたが私を助けてくれることを願っています!

ありがとうフロリアン

4

1 に答える 1

0

次のコマンドを実行しても問題ありません

export LD_LIBRARY_PATH=/usr/local/lib

または vi を使用してファイルに永続的に追加することもできます

vi ~/.bashrc

于 2013-07-21T10:57:40.417 に答える