-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
Hello,
I am writing a build script for my game engine. The script is split in 2 stages:
- Compilation
- Linking
The compilation stage is fine, but the linking has errors. It runs:
[INFO] CMD: cc -Wall -Wextra -o ../bin/gnost 'cc -Wall -Wextra -o ../bin/gnost ''
/usr/bin/ld: невозможно найти ��.G^: Нет такого файла или каталога
collect2: error: ld returned 1 exit status
But it should run:
[INFO] CMD: cc -Wall -Wextra -o ../bin/gnost ../obj/main.o
Here's the code:
#define OBJ_DIR "../obj"
#define BIN_DIR "../bin"bool link_files(Nob_Walk_Entry entry) {
if (entry.type == FILE_REGULAR) {
Cmd* linkCmd = (Cmd*) entry.data;
nob_cmd_append(linkCmd, entry.path);
}
return true;
}Cmd cmd = {0};
nob_cmd_append(&cmd, "cc", "-Wall", "-Wextra", "-o", BIN_DIR"/gnost");
if (!nob_walk_dir(OBJ_DIR, link_files, .data = &cmd)) return 1;
if (!cmd_run(&cmd)) return 1;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels