You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compile with unicon/iconc produces the following error:
❯ unicon -C hello.icn
Parsing hello.icn: .
Parsing /home/omf/code/icon/unicon/ipl/procs/posix.icn: .........
iconc -U1 -fs -o hello -A /tmp/uni79385330 /tmp/uni86049813-iconc /tmp/uni20299443-iconc
Translating to C:
No errors; no warnings
Compiling and linking C code:
In file included from hello.h:8,
from hello.c:13:
/home/omf/code/icon/unicon/rt/include/rt.h:3091:13: fatal error: ft2build.h: No such file or directory
3091 | #include <ft2build.h>
| ^~~~~~~~~~~~
compilation terminated.
*** C compile and link failed ***
The issue appears to be that ft2build.h is installed in /usr/include/freetype2 but gcc needs to be explicitly told about it. If I explicitly pass the include path it works:
❯ iconc -p '-I/usr/include/freetype2' hello.icn
Translating to C:
hello.icn:
No errors; no warnings
Compiling and linking C code:
Succeeded
I did a quick search and didn't see any other issues mentioning this, so perhaps it's a misconfiguration on my Pop!_OS (Ubuntu-based) system. Any advice would be appreciated.
The text was updated successfully, but these errors were encountered:
Unless you intentionally want -C, you can just drop that and it should work.
I.e, just do unicon hello.icn
Yes that works and is fine for local development, but if I wanted to build a binary that doesn't depend on iconx -- e.g. for distribution to people who don't have Unicon installed -- then -C is needed (although ldd tells me that those binaries have a lot of dynamic library dependencies).
Unicon is an interpreted language, the compiler is still in alpha state. So iconx is expect to be on the target platform typically. You can bundle iconx with an executable by passing -B:
unicon -B hello.icn
Give that a try. OF course that also assumes the the libraries you built iconx against should be available on the target platform. In all cases, portability of binaries is limited for various architectural reasons.
With the following program
hello.icn
:Trying to compile with unicon/iconc produces the following error:
The issue appears to be that
ft2build.h
is installed in/usr/include/freetype2
but gcc needs to be explicitly told about it. If I explicitly pass the include path it works:I did a quick search and didn't see any other issues mentioning this, so perhaps it's a misconfiguration on my Pop!_OS (Ubuntu-based) system. Any advice would be appreciated.
The text was updated successfully, but these errors were encountered: