[cfe-dev] Clang, Windows and stdout.

Fred van Stappen via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 17 08:54:36 PST 2019


 Hello.

I am using MSElang, a Pascal compiler that produces bc (bit-code) files ready
to use/compile with clang.
https://gitlab.com/mseide-msegui/mselang

Here video of MSElang + Clang at work:
mselang_exec.mp4
<http://clang-developers.42468.n3.nabble.com/file/t497746/mselang_exec.mp4>

On Linux 32 bit, MSElang works like charm, doing this:

$ clang my_pascal_llvm.bc -lm -o my_pascal_llvm

---> produces a beautiful my_pascal_llvm executable, fast and light.

Also the bc file is perfectly handled by opt that make a full-working
._opt.bc file.
That ._opt.bc file is perfectly handled too by clang and the executable is
perfectly running.

Big congratulation to LLVM (for that wonderful project) and to Martin (for
MSElang).

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'

Do you have any idea why `stdout'  is not found?
IMHO it is in libgcc but for Windows it does not find it.

Any light will be very appreciated.

Thanks.

Fre;D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190117/c3839370/attachment.html>


More information about the cfe-dev mailing list