1
votes

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

1
Is the shared object file exist on your system? is it on correct path such that it can be found? - taocp
Project Properties > Build > Linker > Libraries I have added a few libraries, also libicuuc.so. Do I have to add libicuuc.so.50 seperately? - user2071938
now I have the same error with "libicui18n.so.50" what are those .50 files? - user2071938
.50 is the version number, see here: faqs.org/docs/Linux-HOWTO/Program-Library-HOWTO.html#AEN46 - taocp
I found the solution here - user2071938

1 Answers

0
votes

run followed command is fine

export LD_LIBRARY_PATH=/usr/local/lib

or you can use vi to add to file permanently

vi ~/.bashrc