try to install Tango+D2 but compile with error symbol undefined (Window)

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Wed May 21 07:44:01 PDT 2014


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


More information about the Digitalmars-d mailing list