View previous topic :: View next topic |
Author |
Message |
zettablade
Joined: 14 Nov 2007 Posts: 2
|
Posted: Fri Dec 21, 2007 3:48 pm Post subject: Build problems w/ Tango 98.4 Frank |
|
|
Derelict will not build with Tango 98.4 Frank. Please fix this. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Dec 23, 2007 9:13 am Post subject: Re: Build problems w/ Tango 98.4 Frank |
|
|
zettablade wrote: | Derelict will not build with Tango 98.4 Frank. Please fix this. |
I'm going to need a great deal more info than this. What's the problem? What tools are you using? How are you compiling? Which OS? _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
zettablade
Joined: 14 Nov 2007 Posts: 2
|
Posted: Sun Dec 23, 2007 6:54 pm Post subject: |
|
|
Really nothing to do with the compiler or the operating system. The newest release of tango has some breaking changes, which are keeping derelict from compiling. Things like toUtf8z need to be changed to toStringz. All you should need to do is get the latest version of tango, and fix the errors that occur when compiling derelict.
EDIT:
So, I checkout the source to see what needed to be done, and the fix is pretty simple. I'll post the dif.
Code: | Index: wrapper.d
===================================================================
--- wrapper.d (revision 279)
+++ wrapper.d (working copy)
@@ -52,14 +52,7 @@
char* toCString(char[] str)
{
- version(Tango)
- {
- return toUtf8z(str);
- }
- else
- {
- return toStringz(str);
- }
+ return toStringz(str);
}
char[] toDString(char* cstr)
|
|
|
Back to top |
|
|
Chman
Joined: 03 Mar 2007 Posts: 11
|
Posted: Thu Jan 03, 2008 9:25 am Post subject: |
|
|
Hi,
I just downloaded Tango 99.4 binaries bundled with DMD (for windows). I installed the last Derelict package (revision 279) and tried to compile some simple code :
Code: | import derelict.opengl.gl;
import tango.io.Console;
void main()
{
try
{
DerelictGL.load();
Cout("Successfully loaded the OpenGL shared library.");
}
catch(Exception e)
{
Cout("Could not load the OpenGL shared library.");
}
} |
There were some errors due to new Tango breaking changes. So I applied the diff from the previous post and now I get symbol errors :
Code: | c:\Coding\D\Project\DerelictTest>bud main.d
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
gdi32.lib
Warning 2: File Not Found gdi32.lib
C:\Coding\D\dmd\import\derelict\opengl\gl.obj(gl)
Error 42: Symbol Undefined _GetPixelFormat@4
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4text4Util7__arrayZ
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4stdc7stringz9fromUtf8zFPaZAa
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4stdc7stringz9toStringzFAaZPa |
I thought that tango ticket was resolved but it seems not (I can't find gdi32.lib in tango distributions). I tried with Tango-current, Tango-0.99.3, I even tried to download dmc files and copy the gdi32.lib file to my lib directory but I always get symbol errors.
Any help would be appreciated
Tom |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Fri Jan 04, 2008 1:55 am Post subject: |
|
|
Chman wrote: |
I thought that tango ticket was resolved but it seems not (I can't find gdi32.lib in tango distributions). I tried with Tango-current, Tango-0.99.3, I even tried to download dmc files and copy the gdi32.lib file to my lib directory but I always get symbol errors.
|
Yeah, seems not to be fixed. I tried this too and had to use the dmc version to get it to work.
Try adding the path to the dmc's lib directory to the sc.ini file which is under tango's bin directory. For example mine looks like this:
Code: |
LIB="%@P%\..\lib;%@P%\..\..\dm\lib"
|
|
|
Back to top |
|
|
Chman
Joined: 03 Mar 2007 Posts: 11
|
Posted: Fri Jan 04, 2008 2:45 am Post subject: |
|
|
Hi,
Thanks for your reply. Adding dmc's libs to link path is the first thing I tried. But then I get these errors :
Code: | OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4text4Util7__arrayZ
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4stdc7stringz9fromUtf8zFPaZAa
C:\Coding\D\dmd\import\derelict\util\wrapper.obj(wrapper)
Error 42: Symbol Undefined _D5tango4stdc7stringz9toStringzFAaZPa |
Any idea ?
Tom |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Fri Jan 04, 2008 2:55 am Post subject: |
|
|
What do you use to build the test app? |
|
Back to top |
|
|
Chman
Joined: 03 Mar 2007 Posts: 11
|
Posted: Fri Jan 04, 2008 3:04 am Post subject: |
|
|
Tom |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Fri Jan 04, 2008 3:10 am Post subject: |
|
|
hmm... I don't use bud, so that could be the problem. Can you try with dsss? |
|
Back to top |
|
|
Chman
Joined: 03 Mar 2007 Posts: 11
|
Posted: Fri Jan 04, 2008 3:20 am Post subject: |
|
|
Hmm never used dsss before. I'll try if I get some time today.
I tried with dmd and I also get a link error :
Code: | c:\Coding\D\Project\DerelictTest>dmd main.d
C:\Coding\D\dmd\bin\link.exe main,,,user32+kernel32/noi+tango-user-dmd.lib;
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
main.obj(main)
Error 42: Symbol Undefined _D8derelict6opengl2gl10DerelictGL4loadFAaZv
--- errorlevel 1 |
Tom |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Fri Jan 04, 2008 3:26 am Post subject: |
|
|
I think you need to give dmd all the required files. At least the linker needs them. So just saying 'dmd main.d' won't work in this case. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Jan 07, 2008 6:33 am Post subject: |
|
|
FYI, the trunk has been updated with the toString fix. I haven't tested it yet since my Tango configuration is apparently borked and I don't feel like sorting it out right now. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
zzzzrrr
Joined: 17 Feb 2007 Posts: 139 Location: Washington, DC
|
Posted: Sat Feb 02, 2008 10:09 am Post subject: fromStringz |
|
|
Hello,
Derelict will not build with the latest edition of Tango, nor is it installable via dsss net install.
fromUtf8z on line 69 in Wrapper.d needs to be changed to fromStringz.
Thanks,
Mason |
|
Back to top |
|
|
odeamus
Joined: 21 Feb 2006 Posts: 78 Location: Helsinki, Finland
|
Posted: Sat Feb 02, 2008 12:30 pm Post subject: |
|
|
Yes, the current version of Tango in the repository contains changes that are incompatible with Derelict. Meaning that the fromUtf8z and fromUtf16z functions have been renamed to fromStringz and fromString16z respectively.
The current release of Tango(0.99.4) still works with Derelict. I recommend that you use it instead straight from the repository. I'm sure Mr Parker will update Derelict when the Tango team pushes out the next release. |
|
Back to top |
|
|
zzzzrrr
Joined: 17 Feb 2007 Posts: 139 Location: Washington, DC
|
Posted: Sun Feb 03, 2008 2:37 pm Post subject: |
|
|
odeamus wrote: | The current release of Tango(0.99.4) still works with Derelict. I recommend that you use it instead straight from the repository. I'm sure Mr Parker will update Derelict when the Tango team pushes out the next release. |
Ok, that works! Thanks; I'm finally up and running on Linux Ubuntu-64bit |
|
Back to top |
|
|
|