私はc/C++を初めて使いました。基本的な問題がいくつかあります。コンパイルするとき、私はundefined reference to u_fopen_48'
エラーが表示されます。この機能のための'u_fopen_48'への未定義の参照
#include <unicode/ustdio.h>
int main(int argc, char** argv) {
UFILE* ufile = u_fopen("/home/emstol/Desktop/utf8demo.txt", "r", NULL, "utf8");
return 0;
}
ドクhereです。私はICU 4.8.1(readme.html;に従って自分自身を段階的にコンパイルしました))、g ++の下にNetBeansを使用しています。それが助けになると、建物の中で私が見るものです:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/emstol/NetBeansProjects/TextFairy1'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/textfairy1
make[2]: Entering directory `/home/emstol/NetBeansProjects/TextFairy1'
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/textfairy1 build/Debug/GNU-Linux-x86/main.o
build/Debug/GNU-Linux-x86/main.o: In function `main':
/home/emstol/NetBeansProjects/TextFairy1/main.cpp:4: undefined reference to `u_fopen_48'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/textfairy1] Error 1
make[2]: Leaving directory `/home/emstol/NetBeansProjects/TextFairy1'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/emstol/NetBeansProjects/TextFairy1'
make: *** [.build-impl] Error 2
正解!迅速な回答ありがとうございます。 +1してください。 – emstol