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 20:15:12 -0600 Message-ID: References: <87le5v2dto.fsf@yahoo.com> <8734s22cpe.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="27795"; 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 Thu Apr 04 04:16:24 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 1rsCeO-000726-EY for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Apr 2024 04:16:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsCdX-00084c-SA; Wed, 03 Apr 2024 22:15:31 -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 1rsCdW-00084U-Rq for emacs-devel@gnu.org; Wed, 03 Apr 2024 22:15:30 -0400 Original-Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsCdV-0005P2-Bx for emacs-devel@gnu.org; Wed, 03 Apr 2024 22:15:30 -0400 Original-Received: by mail-qt1-x841.google.com with SMTP id d75a77b69052e-43444a599d0so2904981cf.3 for ; Wed, 03 Apr 2024 19:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712196928; x=1712801728; 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=N89o4ANS3frXzeeT111BXFC06GJBp+OGF1NQgk1ynsE=; b=Swf5rM8Z7Uji11MLU9DgbAjkToTtIZD5oMKTiObdhYi2PaXT1KbSYTJqpQ7aOSDLV7 UNXisdiLdJsbQfKSqveFmwTGMPKdR1EanT4Vkt8xmeraRixDIKmXoYHLydfvqWBBBl4i 1s9gLG3ae/+qvjIMH2nn6Uzfnr0zNCJOCOalmxcfz19h3bWQ/rAnHYYN9nEDFKTMwy2R IKauFF6moM//dNaFSkx2jEQSGtrA6ZH4suCRu5rNF4t8PSaCpp7cBdUKQMdZnj2MBe1r 24lcvrj8b5bsm6MJnTeR8HHgOu+lUefROHrCMyj9zZaUSrmZO3Z1is1xOVmNW87Y1qf+ gymw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712196928; x=1712801728; 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=N89o4ANS3frXzeeT111BXFC06GJBp+OGF1NQgk1ynsE=; b=FYnH27s7x+mbUO4Udk7rSs9lxHhWTCRvWTSsJm7jK3BV+qhF4nbKBJynGO58v0A9lq G5FPLwKitQNApkXiFczEt3hF/T4n/j3MItebO0NZcc0+K2shqiGwz8WOC0GrNuu75v6x 97assqxo2JEE25Y20ShwaCn90WNYVddDeXsCTqWM9KqBvK4SwgkwIsBU+ZazNX39QwzC q0HJVzdFUlJ/VkEF8douNl2uZxY/cPcPe7VBgS5Pq2kwAAAEqhn9SXSegmZmpj+csK+f gQqfYmpMR9WUkuZPFwZ7wRJEUnwm2EE2sh1TH3W/Jmi4J+U5s0cUzOF6qxwVJPtM4R3x /HqA== X-Gm-Message-State: AOJu0YzntAuXZjl4cfdlpljZ/jPXICVjCQoTH3OIZUAasQmnK7cOAWbS VL7UFFS+Cbn1OfrS/kltPDCnaHixRk34DHyYf7mp2Iy3txr5wyTPNclftPYhbCXrhvHVs1MWzmG bj+fQAQPFZzhem0A5YFwtBdEKjbI= X-Google-Smtp-Source: AGHT+IE7++CC82wIWk0lk5Fp7e0WocUogTU2fIWHC19eZrBFqRtHQGS8ZGa8tArVnO6W8+qPz7I4M9FTD1hEEn5fAfw= X-Received: by 2002:a05:622a:92:b0:431:3e32:8e7c with SMTP id o18-20020a05622a009200b004313e328e7cmr997506qtw.5.1712196924002; Wed, 03 Apr 2024 19:15:24 -0700 (PDT) In-Reply-To: <8734s22cpe.fsf@yahoo.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::841; envelope-from=eg642616@gmail.com; helo=mail-qt1-x841.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:317508 Archived-At: On Wed, Apr 3, 2024 at 6:28=E2=80=AFPM Po Lu wrote: > > Elijah G writes: > > > 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 = library > > that I know allows this is d2d1.h, I needed to test if it's possible wi= th > > msys2 mingw tools. > > But if it's C++, we know it will be impossible, right? Yes you are right, but since d1d2.h is also made in C i think it may be possible to import it into emacs, (except d2d1_helper headers since they are made in pure C++ (also i'm thinking of adding another header into emacs to add similar helper functions)), I think it's worth a try, also I don't know if using opengl can also achieve this. In one of my tests i could import d2d1 into my emacs build, this is the code that i used for this: int w32font_draw (struct glyph_string *s, int from, int to, int x, int y, bool with_background) { HMODULE d2d =3D LoadLibrary ("d2d1.dll"); if (d2d) { #include DEFVAR_INT ("D2D1_HEADER", VD2D1_HEADER_VALUE, doc: /*C HEADER*/); VD2D1_HEADER_VALUE =3D D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR; } ... It's only a test that I made to check if it's possible to import it Without dueling with C++ and using their functions and/or variables in C (I'm not sure where I should move this code snippet). > > Thanks, I think I'll resend this to emacs-devel@gnu.org to know more > > about this. > > That won't be necessary. I've already moved this thread over. Thank you.