www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Linker Error: "Error 42: Symbol Undefined __ModuleInfo_3SDL"

reply Sebastian Beschke <s.beschke gmx.de> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm writing a game using D and SDL.
I'm using the SDL headers and libs from yaneauro's yaneSDK4D. So far it 
worked fine, until I did a bit of early refactoring. Suddenly the 
following linker error appeared:


C:\dmd\bin\..\..\dm\bin\link.exe 
main+misc+Vector+Graphics+Resource+ImageResourc
e+Entity+GuiEntity+Layer+GuiLayer,main.exe,,c:\dmd\SDL\lib\SDL.lib+c:\dmd\SDL\li
b\opengl32.lib+c:\dmd\SDL\lib\SDL_image.lib+c:\dmd\SDL\lib\glu32.lib+user32+kern
el32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

Graphics.obj(Graphics)
  Error 42: Symbol Undefined __ModuleInfo_3SDL
--- errorlevel 1


I've tested this with both the 0.108 and the 0.105 compiler. It appears 
in both windows and linux. However, I can compile and link other SDL 
programs without any problems.

Has anyone had this error before? Where might it come from? As it is, I 
don't even really know what it might mean.

I've attached the offending source file.

Thanks in advance,
Sebastian
Dec 03 2004
parent reply Sebastian Beschke <s.beschke gmx.de> writes:
To be more specific, what might cause the "ModuleInfo" symbol to be 
undefined? Is this a bug?
I haven't changed SDL.d since before the error occured.
Dec 04 2004
parent reply "Ben Hinkle" <ben.hinkle gmail.com> writes:
"Sebastian Beschke" <s.beschke gmx.de> wrote in message 
news:cosotn$2cic$1 digitaldaemon.com...
 To be more specific, what might cause the "ModuleInfo" symbol to be 
 undefined? Is this a bug?
 I haven't changed SDL.d since before the error occured.

I notice SDL.lib appears in the link list so maybe you need to recompiling SDL.lib (in case you haven't already). I wonder if it is related to the _init vs __init problems I had before.
Dec 04 2004
parent Sebastian Beschke <s.beschke gmx.de> writes:
Ben Hinkle wrote:
 I notice SDL.lib appears in the link list so maybe you need to recompiling 
 SDL.lib (in case you haven't already). I wonder if it is related to the 
 _init vs __init problems I had before. 

You were probably right. Switching to the latest Derelict svn version fixed the problem. I've now got an Acces Violation, but I guess that's my fault. Thanks, Sebastian
Dec 04 2004