I've spent hours on this one (probably simple) link error
Mike Parker via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Sat Oct 11 00:28:42 PDT 2014
On 10/11/2014 1:49 PM, WhatMeWorry wrote:
> I had a fairly large number of undefined std.xxx.xxxxx so I added
> phobos.lib to my list of libraries for the linker. But
>
> OPTLINK (R) for Win32 Release 8.00.15
> Copyright (C) Digital Mars 1989-2013 All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> E:\DerelictOrg\DerelictGL3.lib(internal)
> Error 42: Symbol Undefined _D3std6string9toStringzFNaNbAyaZPya
> (pure nothrow immutable(char)*
> std.string.toStringz(immutable(char)[]))
> Building Debug\SimpleOpenGL_3_3_Program.exe failed!
>
>
> in Visual Basic Shell, for my import command:
>
> import std.string;
>
> the text editor has "string" colored blue. Blue is used to
> signify types and reserved words. Could Visual D be trying to
> interpret the string package as the alias type string?
>
> If so, is there a workaround?
>
> thanks.
First, this has nothing to do with what Visual D thinks of the word
"string" in your editor. It doesn't even have to do with the compile
step. It's a link-time error (note the OPTLINK in the very first line).
It means DMD is finding all of the imports fine and is compiling your
project fine, but for one reason or another the linker is unable to find
all the symbols it needs and therefore cannot link the executable. This
sounds very much like a problem with your configuration. Whatever your
original linker errors were, adding phobos.lib to the library list is
*not* the solution. You should never have to do that.
For starters, make sure that you only have one version of DMD installed.
If you have multiple versions, make sure that the version you used to
compile Derelict and the version Visual D is configured to use are the
same. Or, perhaps, if you recently changed to a different version, make
sure you recompile Derelict (and all other third-party libraries) using
that version. Otherwise, drop the phobos.lib from your lib list and come
back here with your original errors and some info on how environment is
set up.
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
More information about the Digitalmars-d-ide
mailing list