From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matvii Jarosh Newsgroups: gmane.lisp.guile.user Subject: OBJ C dynamic library not work Date: Sat, 2 Nov 2024 20:42:41 +0200 Message-ID: <67ca922c-951d-4063-87c0-16050f6ba5e0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15384"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Nov 02 20:38:31 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t7Jx9-0003qm-2D for guile-user@m.gmane-mx.org; Sat, 02 Nov 2024 20:38:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7JwR-000852-EB; Sat, 02 Nov 2024 15:37:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7J5E-0000wk-Nn for guile-user@gnu.org; Sat, 02 Nov 2024 14:42:48 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7J5D-0003O9-5A for guile-user@gnu.org; Sat, 02 Nov 2024 14:42:48 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2fb57f97d75so29121211fa.2 for ; Sat, 02 Nov 2024 11:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730572965; x=1731177765; darn=gnu.org; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=zMKZdqN22OEuEo9k8PdWeih5lthE0xxq3JkKtJmIihs=; b=KoQPqNDtN3v+JCz9uiiS+j3//zSEYwYL/eW+qYWmFLyM+q0FhRdAsFZ+1q7pNju00o tC1w7VponNXm0sn6CEdKnQN5TBeJO83SDG9YPNBX0VuF+ge7Kq85PAE0RfyzWDAxYmY5 8yrC3o6rHITLLQbeFCB0o6cwv91gdJ+w4TUWMKst1beQRLIy3GDwh0ZgwCrIWo7SA0Mu hXL/8ZRgfW9wv7f/eyoWNOlVdamuxDbIvzaEVppXYMUv1cUIfNZFja5sFoYlYhs4voY3 YqSxREgkWB7jx631Q3ilfY5ZQ/EaHQJH0ePg5Uf7nhXVx67Ec80KJoFIb/HuYVIMd2p7 Zl9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730572965; x=1731177765; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=zMKZdqN22OEuEo9k8PdWeih5lthE0xxq3JkKtJmIihs=; b=tp13uSJWTlKsqHy/rOjqOPKlaQE3eAKNxeq1Z79oeRvp+MY0AutIiecMUlvotS0QPP mrGjym3yZm7gXbBF1h9jSTR6/3LBYD+fVo6pF8q8HKtS4Uq3OhNy4ccy1reZJU/ngJZT +KzjgrpabF0sRJL5/8+/X4cxBEcuQgn9SJq5nqcqTxffViR0hX2N+Qvjd3fAb/LKU5w4 5msSDoC4Lvfw2pVLncZAnBA2lqzyWVXP+9la29xcB5GhUNWTON+ro9FeKQr2ZMUFLTZT Lv7x9V2Mt6uF2PINTaBV858PCTxoX2J6ymCexjfXfJ9kdp6aKkyyyIDEZNxYTGI1rALW LDTQ== X-Gm-Message-State: AOJu0YwqtItNjr5jTtJ+fdl5K38nGWKXVcUFRB8I1sBxoWyu7EbirdnF ZE8EMUTOf890rgZ5CrTAdM4QAznCnvA8QULx2/rlAWyXg8Rcls1HdPrFAHSm X-Google-Smtp-Source: AGHT+IGDY7zjzW4MUBB+PRE/RrBtcwIT0A2QweRCbPYza1/46VI/I1vXAoE2+nYtuxgtDvQb5zM4wQ== X-Received: by 2002:a2e:bc1d:0:b0:2fb:2ebf:3251 with SMTP id 38308e7fff4ca-2fcbdfbbf53mr124283471fa.23.1730572964375; Sat, 02 Nov 2024 11:42:44 -0700 (PDT) Original-Received: from [192.168.0.108] ([193.194.109.195]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2fdef6180easm9708481fa.68.2024.11.02.11.42.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Nov 2024 11:42:43 -0700 (PDT) Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=matviijarosh@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 02 Nov 2024 15:37:46 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19872 Archived-At: today i test obj c dynamic library with file: GNUmakefile: GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles SRCDIR = ./lib include $(GNUSTEP_MAKEFILES)/common.make LIBRARY_NAME = libgstep_guile libgstep_guile_OBJC_FILES =  $(SRCDIR)/test.m libgstep_guile_HEADER_FILES = libgstep_guile_CPPFLAGS = $(shell pkg-config --cflags guile-3.0) -fPIC libgstep_guile_OBJC_FLAGS = $(shell pkg-config --cflags guile-3.0) -fPIC libgstep_guile_LINKFLAGS = $(shell gnustep-config --base-libs) -lgnustep-base -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make -include GNUmakefile.postamble lib/test.m: #include #include #include SCM gsg_nslog_wrapper (SCM message) {     NSString *nsMessage = [NSString stringWithUTF8String:scm_to_utf8_string(message)];     NSLog(@"%@", nsMessage);     return SCM_UNSPECIFIED; } void init_gsg () {     scm_c_define_gsubr ("gsg-nslog", 1, 0, 0, gsg_nslog_wrapper); } test.scm: (load-extension "./obj/libgstep_guile.so" "init_gsg") (gsg-nslog "test") but i got an error: Backtrace: In ice-9/boot-9.scm:   1755:12  9 (with-exception-handler _ _ #:unwind? _ # _) In unknown file:            8 (apply-smob/0 #) In ice-9/boot-9.scm:     724:2  7 (call-with-prompt _ _ #) In ice-9/eval.scm:     619:8  6 (_ #(#(#))) In ice-9/boot-9.scm:    2858:4  5 (save-module-excursion _)   4408:12  4 (_) In /home/matvii/Desktop/libgstep_guile/test.scm:       1:0  3 (_) In unknown file:            2 (load-extension "./obj/libgstep_guile.so" "init_gsg") In system/foreign-library.scm:    190:25  1 (load-foreign-library _ #:extensions _ # _ #:search-path …) In unknown file:            0 (dlopen "./obj/libgstep_guile.so" 1) In procedure dlopen: In procedure dlopen: file "./obj/libgstep_guile.so", message "./obj/libgstep_guile.so: undefined symbol: __objc_class_name_NSConstantString"