Код: Выделить всё
module;
#include
#include
#include
module ocr;
import std;
Для редактора LSP Eclipse CDT с использованием clangd (LLVM 21) я сначала предварительно скомпилировал оба модуля:
Код: Выделить всё
clang -std=c++23 -stdlib=libc++ -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile -o std.pcm /usr/lib/llvm-21/share/libc++/v1/std.cppm
clang -std=c++23 -stdlib=libc++ --precompile -o ocr.pcm OCR.cppm
Код: Выделить всё
CompileFlags:
Add: [-std=c++23, -Wall, -fmodule-file=std=std.pcm, -fmodule-file=ocr=ocr.pcm]
Код: Выделить всё
OCR.cpp:69:32: error: reference to 'string' is ambiguous
69 | void OCR::readImage(const std::string &body,
| ^
/usr/lib/gcc/x86_64-linux-gnu/15/../../../../include/c++/15/bits/stringfwd.h:79:33: note: candidate found by name lookup is 'std::string'
79 | typedef basic_string string;
| ^
/usr/lib/llvm-21/share/libc++/v1/std/string.inc:34:14: note: candidate found by name lookup is 'std::string'
34 | using std::string;
Имеет ли вообще смысл то, что я пытаюсь сделать, можно ли разрешить двусмысленность?>
Подробнее здесь: https://stackoverflow.com/questions/798 ... lsp-editor
Мобильная версия