-
-
Notifications
You must be signed in to change notification settings - Fork 518
Closed
Description
First create a library with some missing implementation:
// Library.h
#pragma once
void f();
void g();
// Library.cpp
#include "library.h"
void f() {
g();
}
// void g() { }
Then use it in separate executable :
// main.cpp
#include "library.h"
int main() {
f();
return 0;
}
# CMakeLists.txt
project(test)
add_library(library SHARED library.cpp)
add_executable(main main.cpp)
target_link_libraries(main PUBLIC library)
Mold generates an unusable executable ./main: symbol lookup error: libLibrary.so: undefined symbol: _Z1gv.
I didn't find an option which could enable detection, but if there is one I tend to think it should be activated by default.
(On its side, GCC's linker does report libLibrary.so: undefined reference to g()'`)
Metadata
Metadata
Assignees
Labels
No labels