From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2a.google.com (mail-vs1-xe2a.google.com [IPv6:2607:f8b0:4864:20::e2a]) by sourceware.org (Postfix) with ESMTPS id EE6A73857BA0 for ; Sun, 5 Jun 2022 12:36:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE6A73857BA0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=systemhalted.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=systemhalted.org Received: by mail-vs1-xe2a.google.com with SMTP id c62so11485288vsc.10 for ; Sun, 05 Jun 2022 05:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemhalted.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VXENvHMIS9E4gelqzuChL2FA5VHIaOs5HCUBTyQttRU=; b=YjpUJ7429tfYMvZe6yhfjpg5hYMz5e9gZ27wRp5WKTrj7SfrvxT7zEvd1ILqbwg5Xs 7+1ReCCS6gFeZr+jtua2VWeOz4Pl+ibOz+izrqG899Ng1lMRibcd/KUsJWbgVap/63Y+ NWbtV3FyRgwp9+9XtMnGKat0l/TlMxN7Ldowo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VXENvHMIS9E4gelqzuChL2FA5VHIaOs5HCUBTyQttRU=; b=e/r0IPztPWS5y5D0KcUcIVR8ONs1Ny8FZKYj2IFaGrWo9lGIcnSjHKnpGI5Ez2oDdA YJiEbVyGp9azEpKzgjyJPL9adHRpQQv4zFqzsJrsChB1tWCqfJt9lARvqvGhh3K8tj8R 7cJXZsCpMJMhFEiy824Um6rTPmNzHesUwwlxeeG/3Oyp65VBbg4JsBhcK8L3M7Q/B2Ul Jt9lixuBwU6/EE8YRtFfcxtqr/CI1O6n7vAIsRT1nDihlS3tQ+L1ak4COVhuXOsm31XO Vxb2QsQE/ItyrgsuPpR4ES7zm9Ei6MNKBukyYJtDpOJhk0SSRcrfB6kspxntkEwAAJjO ot0g== X-Gm-Message-State: AOAM530S7rihIHz4AdYBOo2dWxxM0KO3jdUJxB0hFvDAylTznJY+/b5a htBy74XcyiSU+42tdinezqOi5CGyTqK09lXirjsYEw== X-Google-Smtp-Source: ABdhPJwqLLfiG+x2c1adidDloBP1jK6s8rjskCpQKiJuIk6+YbFkpptuphdg6/lx89NGnV8Ev3AHyZIIW66jaoxu9Bg= X-Received: by 2002:a05:6102:3051:b0:349:ea92:3436 with SMTP id w17-20020a056102305100b00349ea923436mr7830586vsa.3.1654432562292; Sun, 05 Jun 2022 05:36:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Carlos O'Donell" Date: Sun, 5 Jun 2022 08:35:51 -0400 Message-ID: Subject: Re: undefined reference To: Ren Wang Cc: libc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2022 12:36:05 -0000 On Sun, Jun 5, 2022 at 6:14 AM Ren Wang via Libc-help 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 > #include > #include 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.