gpt4 book ai didi

c - 我无法让 gcc 工作

转载 作者:太空宇宙 更新时间:2023-11-04 06:09:20 25 4
gpt4 key购买 nike

我必须编译 matlab 工具箱附带的 .c 文件。

为此我下载了 xcode 3.1.4,现在我正在尝试像这样的命令

gcc -o solvemc solvemc.c

并得到类似的错误

Undefined symbols:
"_N_VFree", referenced from:
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
"_CVDiag", referenced from:
_integrate in cca0ChgX.o
_docollapse in cca0ChgX.o
_mcwfalg in cca0ChgX.o
"_CVode1", referenced from:
_integrate in cca0ChgX.o
_docollapse in cca0ChgX.o
_mcwfalg in cca0ChgX.o
_mcwfalg in cca0ChgX.o
"_setall", referenced from:
_main in cca0ChgX.o
"_CVodeFree", referenced from:
_integrate in cca0ChgX.o
_docollapse in cca0ChgX.o
_mcwfalg in cca0ChgX.o
"_genunf", referenced from:
_docollapse in cca0ChgX.o
_mcwfalg in cca0ChgX.o
_mcwfalg in cca0ChgX.o
_mcwfalg in cca0ChgX.o
"_CVodeMalloc", referenced from:
_integrate in cca0ChgX.o
_docollapse in cca0ChgX.o
_mcwfalg in cca0ChgX.o
"_N_VNew", referenced from:
_mcwfalg in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
_main in cca0ChgX.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

最佳答案

看起来您缺少一个或多个库 - 请查看 Matlab 文档以了解需要哪些库才能编译您的代码。

关于c - 我无法让 gcc 工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3663392/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com