1

I'm trying to use the ICU-Timezone API with Netbeans c++(7.3) under Ubuntu with.

I have added the Librarys and include directory for ICU.

Then I want to execute this simple example code:

#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");  
}

I get the Error

/home/ubuntu/NetBeansProjects/DFC/dist/Debug/GNU-Linux-x86/dfc: error while loading shared libraries: libicuuc.so.50: cannot open shared object file: No such file or directory

Hope you can help me!

Thanks Florian

user2071938
  • 2,055
  • 6
  • 28
  • 60

1 Answers1

0

run followed command is fine

export LD_LIBRARY_PATH=/usr/local/lib

or you can use vi to add to file permanently

vi ~/.bashrc

andrewchan2022
  • 4,953
  • 45
  • 48