From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Elijah G Newsgroups: gmane.emacs.devel Subject: Re: How to link new libraries when building emacs Date: Wed, 3 Apr 2024 10:42:32 -0600 Message-ID: References: <87le5v2dto.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 03 18:43:29 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rs3hw-0003r5-NQ for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Apr 2024 18:43:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs3hI-0006uz-8N; Wed, 03 Apr 2024 12:42:48 -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 1rs3hG-0006uZ-Ph for emacs-devel@gnu.org; Wed, 03 Apr 2024 12:42:46 -0400 Original-Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rs3hF-0001pC-3T for emacs-devel@gnu.org; Wed, 03 Apr 2024 12:42:46 -0400 Original-Received: by mail-qk1-x741.google.com with SMTP id af79cd13be357-78a2290b48eso159485a.3 for ; Wed, 03 Apr 2024 09:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712162564; x=1712767364; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G9wVpUt8f+aYKaechLg/z412onkwoovPaMd/HHkW2Rk=; b=P9paOsmSpm2VPvHaIvI6IEuUNnw7QIe2DpsnzHrz2y1LXpWRXOrum1RjTplAN1L/+e g9LmrZ0jG6TGehpbVBzXFNMckk4iBZIaoqAjiE0Mg/JIDWq3yY5QLGXyGIsabLzF3BrJ 6QPkXjZojGDmSSjdjzmTHY48/iRr8GGH8LB82ka1qhDsWUVOL7GiGAo7lGHMuRXUZVek rFykWDLlyUdZHrxUgJafnjdObMzo5iA0aiaN6AWKV7jo9RNs9Z/8HN+HNZ0pGgOFxwD6 txTBKdRkyJUyR4NvJnCxGS4DPE5V0fV/STZv8I+h1RmZtm2n5DUbUcFZ0ebDLwauB0gy gUxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712162564; x=1712767364; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G9wVpUt8f+aYKaechLg/z412onkwoovPaMd/HHkW2Rk=; b=UmF3Q6ir+yNmef0Njm8On2o2vaFsGaNhfekvM4byCG9Rl32Kh498Ia6+bG0UKcrh+F WRRtosuvWh89x0BUCqJUeN5bSljSgfiifD3/NzR4wBhOQ8m0FlR35/FksLiqJvTn+Pts fpqbZ6UMm3hnztNaoN1OiOQzTfGxvQzWiTg51ZzqWvK2LjdONxbJ5YFPbfXadkFVlwG7 eIMeR4jyvO8LFLZTdJtCu3WTAkhP1xFAuYvfTmDzgELTaA9t6mvuax6XDz9gA71lZgUq uq64KHvAFL9nlBHAYPe0Xi/vDbURx8/Ea2YZOhhuaG9hPVi9aqIg057Y1s7AP5ltl6YP m30w== X-Gm-Message-State: AOJu0YyXC//yIJGKQ8rdokcoyXGyh2pir6Y66hBMhqIaCjs4IDXdwfgX UxZXgFM+XInQamdeM+HgGz5kbmnaAPcSIvBl9II7A9Aj/ho0plZzjQZDT8D8+ng0z6PIsRdPp+n gGSSgw2YRjfb9Z35pRU7XGN3heyCz7sdNWQJ+pA== X-Google-Smtp-Source: AGHT+IFY0VH4xc18as00CWcHbByrXbDIJy1Advq0SHfqc8xDO6r3Fc3Qjf/r9n/en1lLRdmsaoW+s3Wa64/+rRZ3zhI= X-Received: by 2002:a05:622a:1304:b0:431:3df7:6fd3 with SMTP id v4-20020a05622a130400b004313df76fd3mr17431521qtk.29.1712162563946; Wed, 03 Apr 2024 09:42:43 -0700 (PDT) In-Reply-To: <87le5v2dto.fsf@yahoo.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::741; envelope-from=eg642616@gmail.com; helo=mail-qk1-x741.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317497 Archived-At: On Tue, Apr 2, 2024 at 11:52=E2=80=AFPM Po Lu wrote: > > Elijah G writes: > > > Hello, i don't know if this is a good place to ask this, i'm building > > emacs with an additional library (exactly d2d1.h), however i'm getting > > errors that library isn't linking, I have been looking for how to > > solve it, but nothing, even i've tried searching in commits about > > other libraries imported but I ended up getting lost. So If anyone > > knows I would greatly appreciate it. > > Unless this library exists in Windows 9X, merely linking with the > library will not suffice; it must be dynamically loaded, and its > functions avoided on systems that predate their introduction. Grepping > for "LoadLibrary" should return plenty of examples. > Thank you, I thought I had to modify autoconf files to import the library like libjansson or windows.h, I'll test it. > Also, reading > > https://github.com/apitrace/dxsdk/blob/master/Include/d2d1.h > > d2d1 is also a C++ library, while Emacs headers expect a C compiler and > probably cannot be made to compile otherwise without substantial effort > and creating a new burden on the rest of us, so it's not possible to > make use of its functionality unless we decide to require a C++ compiler > for the MS Windows port, and even then not without restricting calls to > C++ functions in files isolated from Emacs facilities which in turn > export C interfaces to such functionality. I'm not confident that > MinGW's C++ ABI is stable enough to support loading C++ libraries at > runtime either. > I don't know if there are already libraries in emacs that also are C++, I'm trying to get support for color emojis in the NT port and the only libr= ary that I know allows this is d2d1.h, I needed to test if it's possible with msys2 mingw tools. > > Also I would like to know where the font display source is stored, > > It's divided among w32font.c, w32uniscribe.c and hbfont.c, AFAIK. > Thanks. > Finally, emacs-devel@gnu.org is a far more suitable venue for questions > regarding Emacs development. Thanks, I think I'll resend this to emacs-devel@gnu.org to know more about this.