C++ Netbeans:加载共享库时出错:libicuuc.so.50:无法打开共享对象文件:没有此类文件或目录

C++ Netbeans:加载共享库时出错:libicuuc.so.50:无法打开共享对象文件:没有此类文件或目录,c++,timezone,shared-libraries,netbeans-7,icu,C++,Timezone,Shared Libraries,Netbeans 7,Icu,我正试图在Ubuntu下的Netbeans c++(7.3)中使用ICU时区API 我已经添加了图书馆和ICU目录 然后我想执行以下简单的示例代码: #include <ctime> #include <stdlib.h> #include <stdio.h> #include "DateFormats.h" #include "NumberFormats.h" #include <time.h> #include <unistd.h>

我正试图在Ubuntu下的Netbeans c++(7.3)中使用ICU时区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");  
}
#包括
#包括
#包括
#包括“DateFormats.h”
#包括“NumberFormats.h”
#包括
#包括
#包括
#包括
使用名称空间std;
int main(int argc,字符**argv){

cout按照命令运行就可以了

export-LD\u-LIBRARY\u-PATH=/usr/local/lib

或者您可以使用vi永久地添加到文件中


vi~/.bashrc

您的系统上是否存在共享对象文件?它是否位于正确的路径上,以便可以找到它?项目属性>构建>链接器>库我添加了一些库,也添加了libicuuc.so。我必须单独添加libicuuc.so.50吗?现在我与“libicui18n.so.50”有相同的错误那些.50文件是什么?.50是版本号,请看这里:我找到了解决方案