can't build libuid examples
Mike Parker
aldacron at gmail.com
Wed Mar 7 00:59:41 UTC 2018
On Tuesday, 6 March 2018 at 19:19:05 UTC, greatsam4sure wrote:
> Try to build libuid examples get the following error.
> dub build, build successfully on the root folder. I will
> appreciate any help. Just try to build a gui app using dlang.
>
>
> OPTLINK (R) for Win32 Release 8.00.17
Those "Undefined Symbol" errors all mean you aren't linking with
the libui library. Looking at the dub.json for libuid, it
obviously *is* configured to link with libui to build the
examples:
https://github.com/mogud/libuid/blob/c36e994df238f03516abbb4a75ed054e44b602b5/dub.json#L21
However, if you read the project README, you'll see this:
> libuid is a binding of libui. So you have to build libui first.
Did you do so? libuid provides the proper version of the libui
source via a git submodule.
If you did build it, you probably used Visual Studio. In which
case, you also see this in the README:
> You can use --arch to specify architecture of you platform.
> Note in windows, use --arch=x86_mscoff to create 32bit binary.
By default, DMD uses the OPTLINK linker, which expects object
files in the OMF format and is incompatible with binaries
produced by Visual Studio (which uses the COFF format). Passing
--arch=x86_mscoff on your dub command line will cause DMD to use
the MS linker instead of OPTLINK.
More information about the Digitalmars-d-learn
mailing list