Thread overview
SDL problem with SDL_Init
Sep 29, 2004
Hytalk
Sep 29, 2004
clayasaurus
Sep 29, 2004
Hytak
Sep 30, 2004
Hytak
Sep 30, 2004
h3r3tic
Sep 30, 2004
J C Calvarese
Sep 30, 2004
Hytak
September 29, 2004
Hi,
I just started (back) the SDL. It is not too hard because I did a bit of it in
C++, but when I arrived to the initialisation and other stuff, I have messages
like this:

Error 42: Symbol Undefined _SDL_Init

Of course it is a linker error: the progrem itself compile. However, I addes all the file that (I think) would be necessery.

It is sticking on that part of code (there will probably be more later):

if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 )
{
throw new Error("Couldn't initialize SDL");
}

It is the way that is in the test file... it's probably the good one...

Thanks for yours answer.


September 29, 2004
Are you on windows/linux?

What SDL D interface do you use? Are you using derelict (www.dsource.org/projects/derelict) or another one?

If you're using derelict, linking isn't necessary since the library is loaded at run time. just call DerelictSDL_Load();

If not, on linux i know you can link using -lSDL. I'm not too sure about linking dll's on windows i've never done that.

Hytalk wrote:
> Hi,
> I just started (back) the SDL. It is not too hard because I did a bit of it in
> C++, but when I arrived to the initialisation and other stuff, I have messages
> like this:
> 
> Error 42: Symbol Undefined _SDL_Init
> 
> Of course it is a linker error: the progrem itself compile.
> However, I addes all the file that (I think) would be necessery.
> 
> It is sticking on that part of code (there will probably be more later):
> 
> if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) {
> throw new Error("Couldn't initialize SDL");
> }
> 
> It is the way that is in the test file... it's probably the good one...
> 
> Thanks for yours answer.  
> 
> 
September 29, 2004
I was (tryed) using the update of the DedicateD SDL port, but I will see Derelict... it sounds good. I will try it and see if it works.




In article <cjd8mr$7q2$1@digitaldaemon.com>, clayasaurus says...
>
>Are you on windows/linux?
>
>What SDL D interface do you use? Are you using derelict (www.dsource.org/projects/derelict) or another one?
>
>If you're using derelict, linking isn't necessary since the library is loaded at run time. just call DerelictSDL_Load();
>
>If not, on linux i know you can link using -lSDL. I'm not too sure about linking dll's on windows i've never done that.
>
>Hytalk wrote:
>> Hi,
>> I just started (back) the SDL. It is not too hard because I did a bit of it in
>> C++, but when I arrived to the initialisation and other stuff, I have messages
>> like this:
>> 
>> Error 42: Symbol Undefined _SDL_Init
>> 
>> Of course it is a linker error: the progrem itself compile. However, I addes all the file that (I think) would be necessery.
>> 
>> It is sticking on that part of code (there will probably be more later):
>> 
>> if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 )
>> {
>> throw new Error("Couldn't initialize SDL");
>> }
>> 
>> It is the way that is in the test file... it's probably the good one...
>> 
>> Thanks for yours answer.
>> 
>> 


September 30, 2004
I tried with Derelict, but the same problem happens.
Is there something particular that need to be done? I have the .lib in the lib
folder, the SDL.dll, and .d files... does someone know why I have this problem?
(I am sure someone got it before...)





In article <cjfd3i$1kmd$1@digitaldaemon.com>, Hytak says...
>
>I was (tryed) using the update of the DedicateD SDL port, but I will see Derelict... it sounds good. I will try it and see if it works.
>
>
>
>
>In article <cjd8mr$7q2$1@digitaldaemon.com>, clayasaurus says...
>>
>>Are you on windows/linux?
>>
>>What SDL D interface do you use? Are you using derelict (www.dsource.org/projects/derelict) or another one?
>>
>>If you're using derelict, linking isn't necessary since the library is loaded at run time. just call DerelictSDL_Load();
>>
>>If not, on linux i know you can link using -lSDL. I'm not too sure about linking dll's on windows i've never done that.
>>
>>Hytalk wrote:
>>> Hi,
>>> I just started (back) the SDL. It is not too hard because I did a bit of it in
>>> C++, but when I arrived to the initialisation and other stuff, I have messages
>>> like this:
>>> 
>>> Error 42: Symbol Undefined _SDL_Init
>>> 
>>> Of course it is a linker error: the progrem itself compile. However, I addes all the file that (I think) would be necessery.
>>> 
>>> It is sticking on that part of code (there will probably be more later):
>>> 
>>> if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 )
>>> {
>>> throw new Error("Couldn't initialize SDL");
>>> }
>>> 
>>> It is the way that is in the test file... it's probably the good one...
>>> 
>>> Thanks for yours answer.
>>> 
>>> 
>
>


September 30, 2004
Are you perfectly sure you're linking your project against derelictSDL.lib ? :]


Tom





Hytak wrote:
> I tried with Derelict, but the same problem happens.
> Is there something particular that need to be done? I have the .lib in the lib
> folder, the SDL.dll, and .d files... does someone know why I have this problem?
> (I am sure someone got it before...)
> 
> 
> 
> 
> 
> In article <cjfd3i$1kmd$1@digitaldaemon.com>, Hytak says...
> 
>>I was (tryed) using the update of the DedicateD SDL port, but I will see
>>Derelict... it sounds good. I will try it and see if it works.
>>
>>
>>
>>
>>In article <cjd8mr$7q2$1@digitaldaemon.com>, clayasaurus says...
>>
>>>Are you on windows/linux?
>>>
>>>What SDL D interface do you use? Are you using derelict (www.dsource.org/projects/derelict) or another one?
>>>
>>>If you're using derelict, linking isn't necessary since the library is loaded at run time. just call DerelictSDL_Load();
>>>
>>>If not, on linux i know you can link using -lSDL. I'm not too sure about linking dll's on windows i've never done that.
>>>
>>>Hytalk wrote:
>>>
>>>>Hi,
>>>>I just started (back) the SDL. It is not too hard because I did a bit of it in
>>>>C++, but when I arrived to the initialisation and other stuff, I have messages
>>>>like this:
>>>>
>>>>Error 42: Symbol Undefined _SDL_Init
>>>>
>>>>Of course it is a linker error: the progrem itself compile.
>>>>However, I addes all the file that (I think) would be necessery.
>>>>
>>>>It is sticking on that part of code (there will probably be more later):
>>>>
>>>>if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0 ) {
>>>>throw new Error("Couldn't initialize SDL");
>>>>}
>>>>
>>>>It is the way that is in the test file... it's probably the good one...
>>>>
>>>>Thanks for yours answer.  
>>>>
>>>>
>>
>>
> 
> 
September 30, 2004
Hytak wrote:
> I tried with Derelict, but the same problem happens.
> Is there something particular that need to be done? I have the .lib in the lib
> folder, the SDL.dll, and .d files... does someone know why I have this problem?
> (I am sure someone got it before...)

Could you be using a Microsoft-format .lib? Microsoft .libs are incompatible with the Digital Mars linker.

Are you using Derelict? I thought Derelict doesn't use .libs: ("Take a look at my project 'Derelict' here on dsource. It was created to make it easier to use SDL and others, and you don't need to worry about SDL.lib.").

You might find it helpful to read this thread:
http://www.dsource.org/forums/viewtopic.php?t=277


-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
September 30, 2004
Problem fixed, thank a lot J C Calvarese.
Derelict is really practice, and I will recommand it to everyone!
Hehe
I will use it. And probably then when I will do some OpenGL, I will use that
too.

If you need any help, I am there... (It is just for the formality ; I could not really do anything I think...)

Thanks.