FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

module sdl is in file 'derelict\sdl\sdl.d' cannot be read

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
RedShft



Joined: 15 Feb 2012
Posts: 12

PostPosted: Tue Mar 06, 2012 6:09 pm    Post subject: module sdl is in file 'derelict\sdl\sdl.d' cannot be read Reply with quote

I have been trying to compile my program for release in VS 2010, with visual D. However, I've that error which refers to my derelict import line:

import derelict.sdl.sdl;

I've thought of and tried deleting this, but in the end I decided not to because I thought it was required to load and run SDL? Is that wrong?

I have that declaration above each module that requires the use of SDL is that proper use?

I can compile my program in debug without any error.

Here is the full error:

Error 1 Error: module sdl is in file 'derelict\sdl\sdl.d' which cannot be read D:\Documents\Projects\Test\Test\PApp.d 1
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Mar 07, 2012 1:45 am    Post subject: Reply with quote

RedShft wrote:
I have been trying to compile my program for release in VS 2010, with visual D. However, I've that error which refers to my derelict import line:

import derelict.sdl.sdl;

I've thought of and tried deleting this, but in the end I decided not to because I thought it was required to load and run SDL? Is that wrong?

I have that declaration above each module that requires the use of SDL is that proper use?


Any symbols you want to make use of need to be available in your module's scope. So, yes, you do need this.

Quote:


I can compile my program in debug without any error.

Here is the full error:

Error 1 Error: module sdl is in file 'derelict\sdl\sdl.d' which cannot be read D:\Documents\Projects\Test\Test\PApp.d 1


Usually this means the module you are importing is not on your import path. My guess is that in Visual Studio you've properly set up your project's Debug configuration, but not the Release configuration.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
RedShft



Joined: 15 Feb 2012
Posts: 12

PostPosted: Wed Mar 07, 2012 6:39 pm    Post subject: Reply with quote

Righto, that certainly solved that problem. Thanks, but now when I try to run that, the program crashes without even starting up the window.

From what I can see it says something about derelict failing to load TTF_OpenFont(...) .
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Mar 07, 2012 10:41 pm    Post subject: Reply with quote

I need a little more information than that. There should be a system error message printed along with that exception. If you could paste the whole thing here, that might help.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
RedShft



Joined: 15 Feb 2012
Posts: 12

PostPosted: Thu Mar 08, 2012 12:34 am    Post subject: Reply with quote

Yeah, sorry. The only way I could try to catch a glimpse of the exception was to run my program multiple times before the console closes.

I'm going to see if I can put a break point to stop the program from closing... although this only happens in release. So I don't know if that will work.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu Mar 08, 2012 2:57 am    Post subject: Reply with quote

system("pause");

Putting that at the end of main should do the trick. You'll need to import core.stdc.stdlib.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
RedShft



Joined: 15 Feb 2012
Posts: 12

PostPosted: Thu Mar 08, 2012 4:57 pm    Post subject: Reply with quote

That unfortunately did not keep the console window open but this is what I can get from the exception:

derelict.util.exception.SymbolLoadException@..\..\..\DerelictUtil\derelict\util\exception.d(43): Failed to load symbol TTF_GetFontKerningSize from shared library SDL_ttf.dll
---------------------
417C84
417AFB
404BD1
404B99
4057F1
40A77F
40A38F
41EEAD
---------------------


Does this help?
Back to top
View user's profile Send private message
RedShft



Joined: 15 Feb 2012
Posts: 12

PostPosted: Fri Mar 09, 2012 12:49 pm    Post subject: Reply with quote

I fixed it. It was just a newbie mistake, I didn't include my assets and dll files in the debug or release folders.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group