最近,我决定try 一下叮当作响,结果奏效了.(这不是问题所在)
但是当我试图运行它时,我得到了一个浮点数.我搜索了clang调试器
并得到LLDB,go 安装它(lldb-14-dev和liblldb-dev通过Synaptic)
也许我错过了一些.很可能 当我try 运行它(lldb./out/roguelike Launch)时,我得到的是:

clang -Wall -Werror -lm *.c -o out/roguelike `sdl2-config --cflags --libs` -lm
lldb .out/roguelike launch
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
(lldb) target create ".out/roguelike"
error: unable to find executable for '.out/roguelike'

这很可能是因为我遗漏了一些lldb内容或忘记了一些争论(不幸的)
但我也不能肯定.不过,如果这很重要(不太可能),下面是我的Makefile:

CC = clang

lazy_compile:
    $(CC) -Wall -Werror -lm *.c -o out/roguelike `sdl2-config --cflags --libs` -lm

lazy_test: lazy_compile
    ./out/roguelike

compile:
    $(CC) -O3 -Os -static *.c -o out/roguelike `sdl2-config --cflags --libs` -lm

debug: lazy_compile
    lldb .out/roguelike launch

run: compile
    ./out/roguelike

我试着摆弄一些包裹,但没有奏效
而且我看不懂大部分关于如何使用lldb的教程
所以我真的不知道是什么,特别是最后一行

推荐答案

你可以用以下命令启动lldb

lldb out/roguelike launch

lldb ./out/roguelike launch

但不是和

lldb .out/roguelike launch

Also, not an err或 but you are including -lm twice.

And yes, what HolyBlackCat says in comments: Provide debug info, just replace your first -lm (linking flags should be placed at the end of the toolchain) with -g and it should w或k.

C++相关问答推荐

我可以动态分配具有空类型函数的矩阵吗?

Win32API Wizzard97 PropSheet_SetWizButton不工作

模拟shell并运行.sh文件

struct 上的OpenMP缩减

使用双指针动态分配和初始化2D数组

如何在C中引发/处理自定义信号?

致命:ThreadSaniizer:在Linux内核6.6+上运行时意外的内存映射

GTK3按钮信号错误

为什么此共享库没有预期的依赖项?

搜索使用int代替time_t的用法

Wcstok导致分段故障

C语言中的数字指针

在C中使用无符号整数模拟有符号整数

如何使用calloc和snprintf

当读取可能会阻塞管道中的父进程时,为什么要等待子进程?

计算时出现奇怪的计算错误;N Select K;在C中

函数的typedef是标准 C 语法吗?它与函数指针的typedef有何不同?

如何向 execl 创建的后台程序提供输入?

可以从指针数组中的值初始化指针吗?

c 函数指针,另一种语法