if (strcmp(ext, "lo") == 0) {
newarg = check_object_exists(cmd_data, arg, ext - arg);
if (!newarg) {
- printf("Can not find suitable object file for %s\n", arg);
+ fprintf(stderr, "Can not find suitable object file for %s\n", arg);
exit(1);
}
if (cmd_data->mode != mLink) {
/* Try the normal dir next. */
newarg = check_library_exists(cmd_data, arg, pathlen, 0, &libtype);
if (!newarg) {
- printf("Can not find suitable library for %s\n", arg);
+ fprintf(stderr, "Can not find suitable library for %s\n", arg);
exit(1);
}
}
if (!c->install_path && (c->output == otDynamicLibraryOnly ||
c->output == otModule || c->output == otLibrary)) {
c->output = otStaticLibraryOnly;
+
+ if (c->options.shared == share_SHARED) {
+ fprintf(stderr, "Can not build a shared library without -rpath");
+ exit(1);
+ }
}
if (c->output == otDynamicLibraryOnly ||