View previous topic :: View next topic |
Author |
Message |
RedShft
Joined: 15 Feb 2012 Posts: 12
|
Posted: Tue Mar 06, 2012 6:09 pm Post subject: module sdl is in file 'derelict\sdl\sdl.d' cannot be read |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed Mar 07, 2012 1:45 am Post subject: |
|
|
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 |
|
|
RedShft
Joined: 15 Feb 2012 Posts: 12
|
Posted: Wed Mar 07, 2012 6:39 pm Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Wed Mar 07, 2012 10:41 pm Post subject: |
|
|
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 |
|
|
RedShft
Joined: 15 Feb 2012 Posts: 12
|
Posted: Thu Mar 08, 2012 12:34 am Post subject: |
|
|
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 |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu Mar 08, 2012 2:57 am Post subject: |
|
|
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 |
|
|
RedShft
Joined: 15 Feb 2012 Posts: 12
|
Posted: Thu Mar 08, 2012 4:57 pm Post subject: |
|
|
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 |
|
|
RedShft
Joined: 15 Feb 2012 Posts: 12
|
Posted: Fri Mar 09, 2012 12:49 pm Post subject: |
|
|
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 |
|
|
|