Thread overview
What could this OptLink Error mean?
Dec 29
Dukc
Dec 30
user1234
Jan 04
Dukc
Jan 05
user789
December 29
I was building one example of DLangUi (dub build --build-mode=allAtOnce --build=debuglinker) and it did compile but the linker started to complain. I did notice it seemed to be related to the standard library, so I updated it and DRuntime to the lastest master, rebuilt them and replaced phobos.lib with the result. I also removed the binary and .dub directory from DLangUI to force Dub to rebuild it, which it did. Still the linker complains, but about a different symbol:

..\..\lib\dlangui.lib(colors)
 Error 42: Symbol Undefined __d_switch_string

Does anybody have an idea what could be causing this?
December 30
On Friday, 29 December 2017 at 16:11:20 UTC, Dukc wrote:
> I was building one example of DLangUi (dub build --build-mode=allAtOnce --build=debuglinker) and it did compile but the linker started to complain. I did notice it seemed to be related to the standard library, so I updated it and DRuntime to the lastest master, rebuilt them and replaced phobos.lib with the result. I also removed the binary and .dub directory from DLangUI to force Dub to rebuild it, which it did. Still the linker complains, but about a different symbol:
>
> ..\..\lib\dlangui.lib(colors)
>  Error 42: Symbol Undefined __d_switch_string
>
> Does anybody have an idea what could be causing this?

The deps have to be rebuild too. Assuming paths and everything is okay (should be the case when you build ~master as indicated in the wiki) just add --force.
January 04
On Saturday, 30 December 2017 at 00:49:48 UTC, user1234 wrote:
>
> The deps have to be rebuild too.

After downloading dmd 78, it started to work. It's likely you were right about the issue, DUB rebuilt everything after detecting new compiler version.

Sorry for my late reply.
January 05
On Thursday, 4 January 2018 at 21:33:58 UTC, Dukc wrote:
> On Saturday, 30 December 2017 at 00:49:48 UTC, user1234 wrote:
>>
>> The deps have to be rebuild too.
>
> After downloading dmd 78, it started to work. It's likely you were right about the issue, DUB rebuilt everything after detecting new compiler version.
>
> Sorry for my late reply.

From a compiler version to another, the ABI can change (examples are: mangling, new overloads as seen with format a couple of months ago). You compiled the program with a slightly different ABI than the one used to compile the deps as static libraries.

I don't know why DUB didn't detect this but as said user1234 always try " --force" on DUB or rebuild deps manually to eliminate this possible cause of problems.