Skip to content

main.cc:(.text+0x103): undefined reference to `launchd_main(int, char**)' while building on arch based system #20

@formula-spectre

Description

@formula-spectre
`[100%] Linking CXX executable test_all
/usr/bin/ld: CMakeFiles/test_all.dir/__/src/main.cc.o: in function `main':
main.cc:(.text+0x103): undefined reference to `launchd_main(int, char**)'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [test/CMakeFiles/test_all.dir/build.make:353: test/test_all] Error 1
make[1]: *** [CMakeFiles/Makefile2:898: test/CMakeFiles/test_all.dir/all] Error 2

compiler: clang version 15.0.7

how to reproduce:

sudo pacman -S clang cmake base-devel nlohmann-json
git clone https://github.com/mheily/relaunchd/ && cd relaunchd
mkdir build && cd build #force of habit lol
CC=clang CXX=clang++ cmake ..
make
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions