error: template with C linkage 问题

在c与c++混合编译过程中出现error: template specialization with C linkage error: template with C linkage 问题,
经查证发现为extern “C” 的使用问题。
#ifdef __cplusplus
extern “C” {
#endif
未增加对应
#ifdef __cplusplus
}
#endif
导致此问题出现。

PS D:\My JAVA\苍穹外卖\前端源码\苍穹外卖前端源码\project-sky-admin-vue-ts> npm install --verbose npm verb cli D:\My Software\nodejsv16\node.exe C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js npm info using npm@8.9.0 npm info using node@v16.17.0 npm timing npm:load:whichnode Completed in 0ms npm timing config:load:defaults Completed in 1ms npm timing config:load:file:C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 3ms npm timing config:load:builtin Completed in 3ms npm timing config:load:cli Completed in 1ms npm timing config:load:env Completed in 1ms npm timing config:load:file:D:\My JAVA\苍穹外卖\前端源码\苍穹外卖前端源码\project-sky-admin-vue-ts\.npmrc Completed in 0ms npm timing config:load:project Completed in 3ms npm timing config:load:file:C:\Users\liuchaokun\.npmrc Completed in 1ms npm timing config:load:user Completed in 1ms npm timing config:load:file:C:\Users\liuchaokun\AppData\Roaming\npm\etc\npmrc Completed in 0ms npm timing config:load:global Completed in 0ms npm timing config:load:validate Completed in 1ms npm timing config:load:credentials Completed in 1ms npm timing config:load:setEnvs Completed in 0ms npm timing config:load Completed in 12ms npm timing npm:load:configload Completed in 12ms npm timing npm:load:mkdirpcache Completed in 1ms npm timing npm:load:mkdirplogs Completed in 0ms npm verb title npm install npm verb argv "install" "--loglevel" "verbose" npm timing npm:load:setTitle Completed in 1ms npm timing config:load:flatten Completed in 2ms npm timing npm:load:display Completed in 9ms npm verb logfile logs-max:10 dir:C:\Users\liuchaokun\AppData\Local\npm-cache\_logs npm verb logfile C:\Users\liuchaokun\AppData\Local\npm-cache\_logs\2025-07-28T03_30_26_365Z-debug-0.log npm timing npm:load:logFile Completed in 6ms npm timing npm:load:timers Completed in 0ms npm timing npm:load:configScope Completed in 0ms npm timing npm:load Completed in 30ms npm timing arborist:ctor Completed in 0ms npm timing arborist:ctor Completed in 1ms npm timing idealTree:init Completed in 95ms npm timing idealTree:userRequests Completed in 0ms npm http fetch GET 200 https://registry.npmmirror.com/@types%2fecharts 254ms (cache revalidated) npm http fetch GET 200 https://registry.npmmirror.com/@types%2fwebpack 143ms (cache revalidated) npm http fetch GET 200 https://registry.npmmirror.com/area-data 162ms (cache revalidated) npm http fetch GET 200 https://registry.npmmirror.com/echarts 222ms (cache revalidated) npm http fetch GET 200 https://registry.npmmirror.com/md5 170ms (cache revalidated) npm http fetch GET 200 https://registry.npmmirror.com/vue-area-linkage 263ms (cache revalidated) npm timing idealTree Completed in 633127ms npm timing command:install Completed in 633136ms npm verb stack Error: unable to resolve dependency tree npm verb stack at Arborist.[failPeerConflict] (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1426:25) npm verb stack at Arborist.[loadPeerSet] (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1392:34) npm verb stack at async Arborist.[buildDepStep] (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:974:11) npm verb stack at async Arborist.buildIdealTree (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7) npm verb stack at async Promise.all (index 1) npm verb stack at async Arborist.reify (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:153:5) npm verb stack at async Install.exec (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:156:5) npm verb stack at async module.exports (C:\Users\liuchaokun\AppData\Roaming\npm\node_modules\npm\lib\cli.js:78:5) npm verb cwd D:\My JAVA\苍穹外卖\前端源码\苍穹外卖前端源码\project-sky-admin-vue-ts npm verb Windows_NT 10.0.22000 npm verb node v16.17.0 npm verb npm v8.9.0 npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: vue-typescript-admin-template@0.1.0 npm ERR! Found: vue@undefined npm ERR! node_modules/vue npm ERR! vue@"^2.6.10" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer vue@">=2.2.0" from vue-area-linkage@5.1.0 npm ERR! node_modules/vue-area-linkage npm ERR! vue-area-linkage@"^5.1.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\liuchaokun\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm verb exit 1 npm timing npm Completed in 633294ms npm verb unfinished npm timer reify 1753673426515 npm verb unfinished npm timer reify:loadTrees 1753673426520 npm verb unfinished npm timer idealTree:buildDeps 1753673426617 npm verb unfinished npm timer idealTree:#root 1753673426618 npm verb code 1 npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\liuchaokun\AppData\Local\npm-cache\_logs\2025-07-28T03_30_26_365Z-debug-0.log
最新发布
07-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值