Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icu: Include file not found #1619

Open
hashitaku opened this issue Aug 19, 2024 · 0 comments · May be fixed by #1620
Open

icu: Include file not found #1619

hashitaku opened this issue Aug 19, 2024 · 0 comments · May be fixed by #1620

Comments

@hashitaku
Copy link

environment

  • Linux

    $ sudo docker container run -it debian:bookworm
    $ apt update && apt install meson
    $ g++ --version
    g++ (Debian 12.2.0-14) 12.2.0
    Copyright (C) 2022 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    $ meson --version
    1.0.1
  • Windows

    > scoop install meson
    > meson --version
    1.5.1
    > cl
    Microsoft(R) C/C++ Optimizing Compiler Version 19.41.34120 for x64
    Copyright (C) Microsoft Corporation.  All rights reserved.

structure

.
|-- foo.cpp
|-- meson.build
`-- subprojects
    `-- icu.wrap
  • meson.build
project(
    'foo',
    'cpp',
    version: '0.1',
    default_options: ['warning_level=3', 'cpp_std=c++14'],
)

icu = subproject('icu')
icuuc = icu.get_variable('icuuc_dep')
icuio = icu.get_variable('icuio_dep')
icui18n = icu.get_variable('icui18n_dep')


exe = executable('foo', 'foo.cpp', dependencies: [icuuc, icuio, icui18n])
  • foo.cpp
#include <iostream>

#include <unicode/ustream.h> // icuio header

int main() {
    auto s = icu::UnicodeString::fromUTF8(u8"あいうえお");

    std::cout << s << std::endl;
}

actual behavior

$ meson setup build
$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /root/foo/build
ninja: Entering directory `/root/foo/build'
[1/2] Compiling C++ object foo.p/foo.cpp.o
FAILED: foo.p/foo.cpp.o
c++ -Ifoo.p -I. -I.. -Isubprojects/icu/source/common -I../subprojects/icu/source/common -Isubprojects/icu/source/i18n -I../subprojects/icu/source/i18n -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++14 -O0 -g -MD -MQ foo.p/foo.cpp.o -MF foo.p/foo.cpp.o.d -o foo.p/foo.cpp.o -c ../foo.cpp
../foo.cpp:3:10: fatal error: unicode/ustream.h: No such file or directory
    3 | #include <unicode/ustream.h> // icuio header
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
@hashitaku hashitaku linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant