public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos@systemhalted.org>
To: Ren Wang <renwang101@gmail.com>
Cc: libc-help <libc-help@sourceware.org>
Subject: Re: undefined reference
Date: Sun, 5 Jun 2022 08:35:51 -0400	[thread overview]
Message-ID: <CAE2sS1g06vopjsDQkhYQQtsR2bN8zEStsUbVPORWni2xWSv8EQ@mail.gmail.com> (raw)
In-Reply-To: <CA+JCqFYCePkAWFyUv5gp4rZbMUL8j71hBxY6=-4ju2DduhpCGA@mail.gmail.com>

On Sun, Jun 5, 2022 at 6:14 AM Ren Wang via Libc-help
<libc-help@sourceware.org> wrote:
> I am working on a project which calls _disable and _enable interrupt built
> in functions in the Windows environment. I can build the code with /Oi with
> Microsoft Visual Studio, but failed with gcc compiler with link errors:

This mailing list is for help with GNU C Library (glibc) issues.

I would suggest sending email to gcc-help@gcc.gnu.org where gcc
developers might have an answer for you.

> I have code included, very simple. I am not sure what the problem is,
> please advise.
> ---------------------------
> #include <stdio.h>
> #include <stdlib.h>
> #include <intrin.h>

You need to make sure that you have included the right headers that
define the prototypes for _disable() and _enable().

> int main()
> {
>     _disable();
>     printf("Hello world!\n");
>     _enable();
>     return 0;
> }

Cheers,
Carlos.

      reply	other threads:[~2022-06-05 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05 10:13 Ren Wang
2022-06-05 12:35 ` Carlos O'Donell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAE2sS1g06vopjsDQkhYQQtsR2bN8zEStsUbVPORWni2xWSv8EQ@mail.gmail.com \
    --to=carlos@systemhalted.org \
    --cc=libc-help@sourceware.org \
    --cc=renwang101@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).