Содержимое demo.cpp приведено ниже:
Код: Выделить всё
#include
#include
#include
#include
using namespace std;
int main(){
icu::UnicodeString str("akeywords", 9, icu::UnicodeString::kInvariant);
cout :
[/list]
[code]D:\\ICU
├─bin
├─lib64
├─include
├─APIChangeReport.html
├─icu4c.css
├─LICENSE
├─readme.html
- попытаться добавить параметры компиляции licuio , в то время как это не сработало.
Прежде чем я столкнулся с описанной выше проблемой, я успешно скомпилировал небольшую демонстрационную версию cpp, в которой используется UCharsetDetector icu(это чистый C API). И он работает без прерываний (кажется, нет проблем).
Код демо-версии приведен ниже:
Код: Выделить всё
#include
#include
#include
#include
#include
using namespace std;
int main(){
string buf;
cin>>buf;
UErrorCode status = U_ZERO_ERROR;
UCharsetDetector *detector = ucsdet_open(&status);
ucsdet_setText(detector, buf.c_str(), buf.length(), &status);
if (U_FAILURE(status)) {
cerr
Подробнее здесь: [url]https://stackoverflow.com/questions/79128195/encounters-ld-error-when-compiling-a-simple-c-source-file-which-involves-icu[/url]
Мобильная версия