www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - I've spent hours on this one (probably simple) link error

reply "WhatMeWorry" <kheaser gmail.com> writes:
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.
Oct 10 2014
parent reply Mike Parker <aldacron gmail.com> writes:
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
Oct 11 2014
parent reply "WhatMeWorry" <kheaser eapl.org> writes:
Ok.  I decided to start fresh and be extrememly methodical. I 
went to
a new Windows 8.1 computer.

I wanted to create a portable D environment so I downloded and 
installed everything to a flash drive D:

I downloaded the Derelict3 .zip file from GitHub today and the 
2.0660.0 windows installer and ran it with all the defaults 
selected. So now I have D and Derelict side by side.

D:\>dir
  Volume in drive D is CENTON USB
  Volume Serial Number is 33EA-F132

  Directory of D:\

07/16/2014  03:15 PM    <DIR>          Derelict3-master
10/11/2014  01:49 PM    <DIR>          D
                0 File(s)              0 bytes
                2 Dir(s)   1,881,473,024 bytes free


I then followed the instructrions on GitHub like so:

D:\>cd Derelict3-master

D:\Derelict3-master>cd build

D:\Derelict3-master\build>dmd build.d
Using the Digital Mars DMD compiler.

D:\Derelict3-master\build>
D:\Derelict3-master\build>build
Building all packages.
Building DerelictPQ

..\import\derelict\pq\functions.d
..\import\derelict\pq\pq.d
..\import\derelict\pq\types.d

dmd -lib -O -release -inline -property -w -wi -I"..\import" 
-of"..\lib/dmd/DerelictPQ.lib"  
"..\import\derelict\pq\functions.d" "..\import\derelict\pq\pq.d" 
"..\import\de
relict\pq\types.d"
D:\D\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1538): Error: 
not a property fileno
D:\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d(1650): 
Error: not a property iota(this.dim()).filter!((i) => ptr[i])
D:\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d(1651): 
Error: not a property filter(iota(this.dim())).map!((i) => 
BitsSet!size_t(ptr[i], i * bitsPerSizeT))

Build Failed!

// Or what I'm really interested in:

D:\Derelict3-master\build>build GL3
Building DerelictGL3

..\import\derelict\opengl3\arb.d
..\import\derelict\opengl3\cgl.d
..\import\derelict\opengl3\constants.d
..\import\derelict\opengl3\deprecatedConstants.d
..\import\derelict\opengl3\deprecatedFunctions.d
..\import\derelict\opengl3\ext.d
..\import\derelict\opengl3\functions.d
..\import\derelict\opengl3\gl.d
..\import\derelict\opengl3\gl3.d
..\import\derelict\opengl3\glx.d
..\import\derelict\opengl3\glxext.d
..\import\derelict\opengl3\internal.d
..\import\derelict\opengl3\types.d
..\import\derelict\opengl3\wgl.d
..\import\derelict\opengl3\wglext.d

dmd -lib -O -release -inline -property -w -wi -I"..\import" 
-of"..\lib/dmd/DerelictGL3.lib"  
"..\import\derelict\opengl3\arb.d" 
"..\import\derelict\opengl3\cgl.d" "..\im
ort\derelict\opengl3\constants.d" 
"..\import\derelict\opengl3\deprecatedConstants.d" 
"..\import\derelict\opengl3\deprecatedFunctions.d" 
"..\import\derelict\opengl3\ext.d
  "..\import\derelict\opengl3\functions.d" 
"..\import\derelict\opengl3\gl.d" 
"..\import\derelict\opengl3\gl3.d" 
"..\import\derelict\opengl3\glx.d" "..\import\derelict\ope
gl3\glxext.d" "..\import\derelict\opengl3\internal.d" 
"..\import\derelict\opengl3\types.d" 
"..\import\derelict\opengl3\wgl.d" 
"..\import\derelict\opengl3\wglext.d"
D:\D\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1538): Error: 
not a property fileno
D:\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d(1650): 
Error: not a property iota(this.dim()).filter!((i) => ptr[i])
D:\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d(1651): 
Error: not a property filter(iota(this.dim())).map!((i) => 
BitsSet!size_t(ptr[i], i * bitsPerSizeT))

Build Failed!

So now I can't even build Derelict3.  I'm starting to feel like a 
total failure :)
Oct 11 2014
parent reply Mike Parker <aldacron gmail.com> writes:
On 10/12/2014 4:13 AM, WhatMeWorry wrote:

 I downloaded the Derelict3 .zip file from GitHub today
The problem is that you're using Derelict3. I put at the very top of the README that Derelict3 is no longer maintained. I left the repository there for those maintaining older projects or whatnot. I haven't even attempted to build it in ages. I just did so now and encountered the same errors. It no longer works with the latest DMD and I will not be updating it. It's a dead project. You were using the DerelictOrg stuff before. Why did you switch? --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Oct 11 2014
parent reply "WhatMeWorry" <kheaser eapl.org> writes:
On Sunday, 12 October 2014 at 01:01:40 UTC, Mike Parker wrote:
 On 10/12/2014 4:13 AM, WhatMeWorry wrote:

 I downloaded the Derelict3 .zip file from GitHub today
The problem is that you're using Derelict3. I put at the very top of the README that Derelict3 is no longer maintained. I left the repository there for those maintaining older projects or whatnot. I haven't even attempted to build it in ages. I just did so now and encountered the same errors. It no longer works with the latest DMD and I will not be updating it. It's a dead project. You were using the DerelictOrg stuff before. Why did you switch? --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Not intentionally, I assure you. I've been using DerelictGL3 and DerelictGLFW3 with my project called openGL_3_3, and my mind started associating 3 with the latest and greatest; hence Derelict3. With DerelictOrg, I got everything compiled and linked within Visual D.
Oct 11 2014
parent Mike Parker <aldacron gmail.com> writes:
On 10/12/2014 2:03 PM, WhatMeWorry wrote:

 Not intentionally, I assure you. I've been using DerelictGL3 and
 DerelictGLFW3 with my project called openGL_3_3, and my mind started
 associating 3 with the latest and greatest; hence Derelict3.
Haha. I'm sure you're not the first. I really want to just nuke the Derelict3 repo completely, but I don't think I should just yet.
 With DerelictOrg, I got everything compiled and linked within Visual D.
Good news! --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Oct 12 2014