Illia
Illia

Reputation: 11

ld: unknown options: -T

Recently, I've been trying to make a PS1 game using CMake and psn00bsdk. For some reason though, it fails: ld: unknown options: -T

This is my CMakeLists.txt

cmake_minimum_required(VERSION 3.21)

include(../n00b/libpsn00b/cmake/internal_setup.cmake)

set(CMAKE_TOOLCHAIN_FILE ../n00b/libpsn00b/cmake/sdk.cmake)

project(
    ps1hello
    LANGUAGES    C
    VERSION      1.0.0
    DESCRIPTION  "hello ps1"
)

file(GLOB _sources src/*.c)
message(STATUS "Sources: ${_sources}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

psn00bsdk_add_executable(ps1hello GPREL ${_sources})

install(FILES ${PROJECT_BINARY_DIR}/hellops1.exe TYPE BIN)

Also yes, i know that using include like that is bad practice, but i think it's fine for a hello world program like this.

I did cmake ., make (the usual steps for compiling a cmake project)

Upvotes: 0

Views: 58

Answers (0)

Related Questions