Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
May 21, 2014 try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
I try to use Tango and Phobo together in D2 and I downloaded the package from link(https://github.com/SiegeLord/Tango-D2 and follow its installation process(https://github.com/SiegeLord/Tango-D2/wiki/Installation#linux-gdc). But it has only Linux installation but not windows. This is what I do. 1. Visual-D and DMD already installed. link 2. I save the file to c:\Tango-D2-d2port 3. modify my C:\D\dmd2\windows\bin\sc.ini as followed [Version] version=7.51 Build 020 ; environment for both 32/64 bit [Environment] DFLAGS= -IC:\Tango-D2-d2port\ -L-LC:\Tango-D2-d2port\ "-I%@P%....\src\phobos" "-I%@P%....\src\druntime\import" ; optlink only reads from the Environment section so we need this redundancy ; from the Environment32 section (bugzilla 11302) LIB="%@P%..\lib" [Environment32] LIB="%@P%..\lib" LINKCMD=%@P%\link.exe [Environment64] LIB="%@P%..\lib64" DFLAGS=%DFLAGS% -L/OPT:NOICF LINKCMD=%VCINSTALLDIR%\bin\link.exe 4. I compile my code using following shell script file and I use dmd2\windows\bin\shell.exe to execute. DMD=C:\D\dmd2\windows\bin\dmd DFLAGS= $(DMD) Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd 5. My sample code from the installation page mentioned above. import tango.io.Stdout; void main() { Stdout("Hello from Tango!").nl; } 6. error message. shell 1.05 C:\D\dmd2\windows\bin\dmd Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html Main.obj(Main) Error 42: Symbol Undefined _D5tango2io6Stdout12__ModuleInfoZ Main.obj(Main) Error 42: Symbol Undefined _D5tango2io6Stdout6StdoutC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput Main.obj(Main) Error 42: Symbol Undefined _D5tango2io6stream6Format20__T12?Outp垿aZ?7newli嘜FNdZC銅 Main.obj(Main) Error 42: Symbol Undefined _D5tango2io6stream6Format20__T12?Outp垿aZ?5printMFYC酷 --- errorlevel 4 I have been trying for 1-2 weeks already and this is the best I can get after I looked up many places for reference but are all futile. |
May 21, 2014 Re: try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
Posted in reply to JJDuck | On 21/05/14 15:18, JJDuck wrote: > I try to use Tango and Phobo together in D2 and I downloaded the package > from link(https://github.com/SiegeLord/Tango-D2 and follow its > installation > process(https://github.com/SiegeLord/Tango-D2/wiki/Installation#linux-gdc). > > But it has only Linux installation but not windows. > > This is what I do. > > 1. Visual-D and DMD already installed. link > 2. I save the file to c:\Tango-D2-d2port > 3. modify my C:\D\dmd2\windows\bin\sc.ini as followed > > [Version] version=7.51 Build 020 > > ; environment for both 32/64 bit > > [Environment] > > DFLAGS= -IC:\Tango-D2-d2port\ -L-LC:\Tango-D2-d2port\ > "-I%@P%....\src\phobos" "-I%@P%....\src\druntime\import" > > ; optlink only reads from the Environment section so we need this > redundancy ; from the Environment32 section (bugzilla 11302) > > LIB="%@P%..\lib" > > [Environment32] > > LIB="%@P%..\lib" > > LINKCMD=%@P%\link.exe > > [Environment64] > > LIB="%@P%..\lib64" > > DFLAGS=%DFLAGS% -L/OPT:NOICF > > LINKCMD=%VCINSTALLDIR%\bin\link.exe > > 4. I compile my code using following shell script file and I use > dmd2\windows\bin\shell.exe to execute. > > DMD=C:\D\dmd2\windows\bin\dmd > > DFLAGS= > > $(DMD) Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd Shouldn't the library have a file extension, like ".lib". -- /Jacob Carlborg |
May 21, 2014 Re: try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
Posted in reply to JJDuck | On Wednesday, 21 May 2014 at 13:18:34 UTC, JJDuck wrote: > I try to use Tango and Phobo together in D2 and I downloaded the package from link(https://github.com/SiegeLord/Tango-D2 and follow its installation process(https://github.com/SiegeLord/Tango-D2/wiki/Installation#linux-gdc). > > But it has only Linux installation but not windows. > > This is what I do. > > 1. Visual-D and DMD already installed. link > 2. I save the file to c:\Tango-D2-d2port > 3. modify my C:\D\dmd2\windows\bin\sc.ini as followed > > [Version] version=7.51 Build 020 > > ; environment for both 32/64 bit > > [Environment] > > DFLAGS= -IC:\Tango-D2-d2port\ -L-LC:\Tango-D2-d2port\ "-I%@P%....\src\phobos" "-I%@P%....\src\druntime\import" > > ; optlink only reads from the Environment section so we need this redundancy ; from the Environment32 section (bugzilla 11302) > > LIB="%@P%..\lib" > > [Environment32] > > LIB="%@P%..\lib" > > LINKCMD=%@P%\link.exe > > [Environment64] > > LIB="%@P%..\lib64" > > DFLAGS=%DFLAGS% -L/OPT:NOICF > > LINKCMD=%VCINSTALLDIR%\bin\link.exe > > 4. I compile my code using following shell script file and I use dmd2\windows\bin\shell.exe to execute. > > DMD=C:\D\dmd2\windows\bin\dmd > > DFLAGS= > > $(DMD) Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd > > 5. My sample code from the installation page mentioned above. > > import tango.io.Stdout; > > void main() > > { > > Stdout("Hello from Tango!").nl; > } > > 6. error message. > > shell 1.05 > > C:\D\dmd2\windows\bin\dmd Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd > > OPTLINK (R) for Win32 Release 8.00.12 > > Copyright (C) Digital Mars 1989-2010 All rights reserved. > > http://www.digitalmars.com/ctg/optlink.html > > Main.obj(Main) > > Error 42: Symbol Undefined _D5tango2io6Stdout12__ModuleInfoZ > > Main.obj(Main) > > Error 42: Symbol Undefined _D5tango2io6Stdout6StdoutC5tango2io6stream6Format20__T12FormatOutputTaZ12FormatOutput > > Main.obj(Main) > > Error 42: Symbol Undefined _D5tango2io6stream6Format20__T12?Outp垿aZ?7newli嘜FNdZC銅 > > Main.obj(Main) > > Error 42: Symbol Undefined _D5tango2io6stream6Format20__T12?Outp垿aZ?5printMFYC酷 > > --- errorlevel 4 > > I have been trying for 1-2 weeks already and this is the best I can get after I looked up many places for reference but are all futile. A few questions: What compiler version? Can you successfully compile and run a simple hello world? Have you tried following the windows installation instructions in the README? FYI: Tango can be build with dub, but - unless you are planning on using dub for building your projects that depend on Tango - then you are on your own as far as installation goes. I would recommend taking a look at code.dlang.org Questions like this are probably better suited to http://forum.dlang.org/group/digitalmars.D.learn |
May 21, 2014 Re: try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg |
> Shouldn't the library have a file extension, like ".lib".
it still doesn't work
|
May 21, 2014 Re: try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | > > A few questions: > > What compiler version? > > Can you successfully compile and run a simple hello world? > > Have you tried following the windows installation instructions in the README? > > > FYI: > > Tango can be build with dub, but - unless you are planning on using dub for building your projects that depend on Tango - then you are on your own as far as installation goes. I would recommend taking a look at code.dlang.org > > Questions like this are probably better suited to http://forum.dlang.org/group/digitalmars.D.learn I used the dmd-2.065.0.zip from http://dlang.org/download.html It works now. 1. I have to use the one-click installation instead of using the zip file 2. the correct version: DFLAGS=-IC:\Tango-D2-d2port\ -L+C:\Tango-D2-d2port\ "-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" there is no double -L as described in the tango installation website. It should be a type. 3. $(DMD) Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd <-- it doesn't matter if I put \libtango-dmd or \libtango-dmd.lib 4. > Questions like this are probably better suited to > http://forum.dlang.org/group/digitalmars.D.learn <-- noted Thank you. |
May 21, 2014 Re: try to install Tango+D2 but compile with error symbol undefined (Window) | ||||
---|---|---|---|---|
| ||||
Posted in reply to JJDuck |
> 3. $(DMD) Main.d -debug -L+C:\Tango-D2-d2port\libtango-dmd <-- it doesn't matter if I put \libtango-dmd or \libtango-dmd.lib
correction. Even though it works without the .lib in my case, but it is highyly recommended to put the .lib if there are other lib file in the same directory.
In my case, there is only one lib file in the folder so it works. It will NOT work if there are other lib files in the same folder.
|
Copyright © 1999-2021 by the D Language Foundation