From: Ren Wang <renwang101@gmail.com>
To: libc-help@sourceware.org
Subject: undefined reference
Date: Sun, 5 Jun 2022 06:13:50 -0400 [thread overview]
Message-ID: <CA+JCqFYCePkAWFyUv5gp4rZbMUL8j71hBxY6=-4ju2DduhpCGA@mail.gmail.com> (raw)
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:
undefined reference to _disable, _enable.
I have code included, very simple. I am not sure what the problem is,
please advise.
Regards,
Ren
---------------------------
#include <stdio.h>
#include <stdlib.h>
#include <intrin.h>
int main()
{
_disable();
printf("Hello world!\n");
_enable();
return 0;
}
next reply other threads:[~2022-06-05 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 10:13 Ren Wang [this message]
2022-06-05 12:35 ` Carlos O'Donell
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='CA+JCqFYCePkAWFyUv5gp4rZbMUL8j71hBxY6=-4ju2DduhpCGA@mail.gmail.com' \
--to=renwang101@gmail.com \
--cc=libc-help@sourceware.org \
/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).