[cfe-dev] Clang, Windows and stdout.
Eli Friedman via cfe-dev
cfe-dev at lists.llvm.org
Thu Jan 17 11:40:45 PST 2019
On 1/17/2019 8:54 AM, Fred van Stappen via cfe-dev wrote:
> But for Windows, using this (I use thw wine emulator on Linux):
>
> wine "/home/fred/.wine/drive_c/Program Files (x86)/LLVM/bin/clang.exe"
> -L /home/fred/mlctest/ -I /home/fred/mlctest/include/ -O3 -v -lgcc_eh
> -std=stdc
> -target i686-w64-mingw32 -dynamic -Wall -Wextra
> /home/fred/mlctest/my_pascal_llvm.bc -lgcc_s
> -lstdc++ -lstdc -lgcc -lgcc_eh -lobjc -lsupc++ -lgcov -liconv2 -lsspicli
> -lwinpthread -lgdiplus -o /home/fred/mlctest/my_pascal_llvm.exe
>
> There is that error (all other undefined references are fixed)
>
> --> undefined reference to `stdout'
On Windows, there is no symbol named stdout; the C standard only
requires a macro in stdio.h. You can use a small C wrapper like the
following to get a reference:
#include <stdio.h>
FILE *getstdout() { return stdout; }
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190117/2b08fd34/attachment.html>
More information about the cfe-dev
mailing list