aeszyl 发表于 2025-8-19 17:34:56

调用火山内置vs2022编译C++源码成功,以后嵌入C++就更方便了

本帖最后由 aeszyl 于 2025-8-19 21:15 编辑

我的电脑是win7,安装不上vs2022,就作了个调用火山内置vs2022编译C++源码的火山程序。
如代码只有cpp、h等文件,没有CMakelists.txt,能自动匹配。编译成功自动打开生成的exe文件目录,C++代码如有问题,编译遇到错误,会打开问题报告,同时错误信息会置于剪辑板中,方便反馈给AI寻找解决方案。

注意:整个文件夹路径中可以有空格,但不能有中文,否则编译不成功



天极至尊 发表于 2025-8-20 08:07:17

https://bbs.voldp.com/static/image/smiley/default/handshake.gifhttps://bbs.voldp.com/static/image/smiley/default/handshake.gifhttps://bbs.voldp.com/static/image/smiley/default/handshake.gif

shuimiao 发表于 2025-8-20 09:00:34

火山内置了vs2022吗

itismine 发表于 2025-8-20 09:03:28

vs2022需要自己安装一下吗?

提示错误

构建结果:   配置失败


CMake 配置日志:

-- The CXX compiler identification is MSVC 19.29.30151.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/Soft/vol_64_free/plugins/vprj_win/sdk/compiler/normal/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (23.6s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/Shibeng/DOWNLO~1/C__~1/build

构建日志:   (无)


aeszyl 发表于 2025-8-20 10:00:11

本帖最后由 aeszyl 于 2025-8-22 09:30 编辑

itismine 发表于 2025-8-20 09:03
vs2022需要自己安装一下吗?

提示错误

以下是你的火山内置的vs编译器和我的对比,明显你的版本要低
----------------------------------------------
-- The CXX compiler identification is MSVC 19.29.30151.0
D:/Soft/vol_64_free/plugins/vprj_win/sdk/compiler/normal/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
----------------------------------------------
-- The CXX compiler identification is MSVC 19.44.35214.0

D:/Program Files/voldev VS2022/plugins/vprj_win/sdk/compiler/normal/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
----------------------------------------------
页: [1]
查看完整版本: 调用火山内置vs2022编译C++源码成功,以后嵌入C++就更方便了