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

cannot build in windows vs 2019 #543

Open
sparrowyang opened this issue Feb 8, 2025 · 1 comment
Open

cannot build in windows vs 2019 #543

sparrowyang opened this issue Feb 8, 2025 · 1 comment

Comments

@sparrowyang
Copy link

hi:
cling is a great project!. I want to build it and use it in my c++ app.
when I build it following https://rawgit.com/vgvassilev/cling/master/www/build.html and forum https://root-forum.cern.ch/t/compiling-cling-on-windows-msvc-2022/47106 instead of https://github.com/root-project/cling README.md( also build failed ) .I get some error in building.:

build_error.log
config.log

my environment:

Visual studio 2019 , cmake version 3.29.6, Python 3.13.1

I don't know why so many symble can't find in building (Some fragments of build_error.log):

C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(401,29): error C3536: “NewCS”: 初始化之前无法使用 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]       
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(401,35): error C2440: “<function-style-cast>”: 无法从“initializer list”转换为“cling::ASTNodeInfo” [C:\wp\cling2\build\tools\cling\lib\Inter
preter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(401,35): message : 无构造函数可以接受源类型,或构造函数重载决策不明确 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(725,54): error C2653: “ArraySizeModifier”: 不是类或命名空间名称 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(725,73): error C2065: “Normal”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(817,41): error C2653: “ArraySizeModifier”: 不是类或命名空间名称 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(817,60): error C2065: “Normal”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(820,5): error C2065: “StringLiteralKind”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(820,23): error C2146: 语法错误: 缺少“;”(在标识符“Kind”的前面) [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(820,23): error C2065: “Kind”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(820,30): error C2653: “StringLiteralKind”: 不是类或命名空间名称 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(820,49): error C2065: “Ordinary”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]        
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(823,42): error C2065: “Kind”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\DynamicLookup.cpp(851,41): error C2661: “clang::MultiLevelTemplateArgumentList::MultiLevelTemplateArgumentList”: 没有重载函数接受 3 个参数 [C:\wp\cling2\build\too
ls\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]
C:\wp\cling2\src\tools\cling\lib\Interpreter\AutoloadCallback.cpp(92,26): error C2039: "starts_with": 不是 "llvm::StringRef" 的成员 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.
vcxproj]
C:\wp\cling2\src\tools\cling\include\cling/Interpreter/Interpreter.h(34): message : 参见“llvm::StringRef”的声明 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxproj]        
C:\wp\cling2\src\tools\cling\lib\Interpreter\AutoloadCallback.cpp(114,9): error C2065: “ConstSearchDirIterator”: 未声明的标识符 [C:\wp\cling2\build\tools\cling\lib\Interpreter\obj.clingInterpreter.vcxpro
j]

I am very grateful if you could help me solve the problem

@sparrowyang
Copy link
Author

I try README build.

PS D:\wp\cling\cling-build> cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm
CMake Warning:
  Ignoring extra path from command line:

   "D:/wp/cling/cling"


CMake Deprecation Warning at D:/wp/cling/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:6 (include)


CMake Deprecation Warning at D:/wp/cling/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:6 (include)

why cmake "Ignoring extra path from command line:"

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

No branches or pull requests

1 participant