From: fedor_qd@mail.ru
To: renwang101@gmail.com
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: undefined reference
Date: Mon, 06 Jun 2022 01:07:02 +0300 [thread overview]
Message-ID: <1654466822.369451905@f27.my.com> (raw)
In-Reply-To: <001401d878dc$9d2167a0$d76436e0$@gmail.com>
You need linked to appropriate library if windows you target.
--
Sent from Outlook Email App for Android нядзеля, 05 чэрвеня 2022, 04:04PM +03:00 from renwang101--- via Gcc-help gcc-help@gcc.gnu.org :
>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 flag 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, maybe I should link with a specific library. Please advise.
>
>
>
>Regards,
>
>
>
>Ren
>
>---------------------------
>
>#include
>#include
>#include
>int main()
>{
> _disable();
> printf("Hello world!\n");
> _enable();
> return 0;
>}
>
next prev parent reply other threads:[~2022-06-05 22:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+JCqFYCePkAWFyUv5gp4rZbMUL8j71hBxY6=-4ju2DduhpCGA@mail.gmail.com>
2022-06-05 13:03 ` renwang101
2022-06-05 22:07 ` fedor_qd [this message]
2022-06-05 22:54 ` renwang101
2004-09-11 15:35 zippo
2004-09-11 15:58 ` Eljay Love-Jensen
2004-09-11 20:00 ` zippo
2004-09-11 23:35 ` Eljay Love-Jensen
-- strict thread matches above, loose matches on Subject: below --
2002-10-29 17:22 Undefined Reference Vincent Lee
2002-10-30 1:06 ` bjorn rohde jensen
2000-02-04 8:18 undefined reference Andre Heidenreich
2000-02-06 19:06 ` Alexandre Oliva
2000-04-01 0:00 ` Alexandre Oliva
2000-04-01 0:00 ` Andre Heidenreich
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=1654466822.369451905@f27.my.com \
--to=fedor_qd@mail.ru \
--cc=gcc-help@gcc.gnu.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).