Lnk2019

I don’t know what are happening, all my working codes writed whit SDL now
are returning this error, its like i let it too much time alone and it
broked, i don’t get it, if it was working why now i get this error? Its some
problem of update or anything else?

That’s the “unresolved external” error, meaning the linker couldn’t
find a function or variable which one of the source files references.

If the functions are SDL_ functions, make sure you are linking with
the SDL lib file.

What are the exact error messages you’re seeing?

Peter

2008/10/7 Giuliano Pieta :> I don’t know what are happening, all my working codes writed whit SDL now

are returning this error, its like i let it too much time alone and it
broked, i don’t get it, if it was working why now i get this error? Its some
problem of update or anything else?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

error LNK2019: unresolved external symbol _SDL_main referenced in function
_main

thats the error
but its weird, I didn’t modified it

2008/10/7 Peter Mackay <mackay.pete+sdl at gmail.com<mackay.pete%2Bsdl at gmail.com>>

That’s the “unresolved external” error, meaning the linker couldn’t
find a function or variable which one of the source files references.

If the functions are SDL_ functions, make sure you are linking with
the SDL lib file.

What are the exact error messages you’re seeing?

Peter

2008/10/7 Giuliano Pieta <@Giuliano_Pieta>:

I don’t know what are happening, all my working codes writed whit SDL now
are returning this error, its like i let it too much time alone and it
broked, i don’t get it, if it was working why now i get this error? Its
some
problem of update or anything else?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

are you on windows, mac or linux ?On 07 Oct 2008, at 15:39, Giuliano Pieta wrote:

error LNK2019: unresolved external symbol _SDL_main referenced in
function _main

thats the error
but its weird, I didn’t modified it

2008/10/7 Peter Mackay <mackay.pete+sdl at gmail.com>
That’s the “unresolved external” error, meaning the linker couldn’t
find a function or variable which one of the source files references.

If the functions are SDL_ functions, make sure you are linking with
the SDL lib file.

What are the exact error messages you’re seeing?

Peter

2008/10/7 Giuliano Pieta :

I don’t know what are happening, all my working codes writed whit
SDL now
are returning this error, its like i let it too much time alone
and it
broked, i don’t get it, if it was working why now i get this
error? Its some
problem of update or anything else?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Indeed he is on Windows, LNK2019 is a M*crosoft-style error number.

Is this the problem with SDL having its own main()? (I just don’t know
anything about this issue)

Indeed he is on Windows, LNK2019 is a M*crosoft-style error number.

Is this the problem with SDL having its own main()? (I just don’t know
anything about this issue)

He should have SDL.lib and SDLmain.lib added to his project. And I believe
link order is important, too.

-WillOn Tue, Oct 7, 2008 at 9:49 AM, Alexander Shpilkin wrote:

It sounds like he has SDLmain.lib linked (which defines main) but is
lacking his own main function.

SDL_main.h #defines main to SDL_main if I remember correctly.

This SDL_main stuff is disappearing with SDL 1.3, isn’t it? (prayer
smiley thing)

Pete

2008/10/7 Will Langford :> On Tue, Oct 7, 2008 at 9:49 AM, Alexander Shpilkin wrote:

Indeed he is on Windows, LNK2019 is a M*crosoft-style error number.

Is this the problem with SDL having its own main()? (I just don’t know
anything about this issue)

He should have SDL.lib and SDLmain.lib added to his project. And I believe
link order is important, too.
-Will


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Maybe he’s just not including SDL_main.h in the file where main() is
defined, so he’s left with to different main() functions, one from SDL
and other from the program itself.

Alex

Maybe he’s just not including SDL_main.h in the file where main() is
defined, so he’s left with to different main() functions, one from SDL
and other from the program itself.

Alex

What your’e describing would be a compile time problem, not a link time
problem. Not having the .lib’s in the project is the most likely reason.

-WillOn Tue, Oct 7, 2008 at 11:03 AM, Alexander Shpilkin wrote:

i have sdl.lib and sdlmain.lib linked on the linker/input/additional
dependencies(visual studio pro 2005)

i have included #include “SDL/SDL.h” as i always do

but what is weird and most important is that it WAS working fine, i let
those little programs working, i also had the .exe to show it to ppl…it
just stop working @.@
i setted up the project like lazy foo’s tutorial say to do, i always do like
that, and it used to work well…it looks just like VS changed his mind
about compiling my programs

2008/10/7 Will Langford > On Tue, Oct 7, 2008 at 11:03 AM, Alexander Shpilkin wrote:

Maybe he’s just not including SDL_main.h in the file where main() is
defined, so he’s left with to different main() functions, one from SDL
and other from the program itself.

Alex

What your’e describing would be a compile time problem, not a link time
problem. Not having the .lib’s in the project is the most likely reason.

-Will


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

i have sdl.lib and sdlmain.lib linked on the linker/input/additional
dependencies(visual studio pro 2005)

I sadly, only have VC6, and am unsure about any changes that may have been
introduced, etc in VS2005 et all. I’ll eventually get VC++ Express
installed in a virtual machine… but that is not today heh.

-WillOn Tue, Oct 7, 2008 at 1:26 PM, Giuliano Pieta wrote:

O.o i found the problem…
int main(int argc, char* args[])
The problem was just the damn “s” in args, i just figured out my other
programs have an
arg"v" and changed the damn letter, its working xD
Its weird, i probaly copied this main function whit the error to the other
programs to make sure it was right, and i never will know from where that s
come from

tanx for the help -_-"

2008/10/7 Will Langford > On Tue, Oct 7, 2008 at 1:26 PM, Giuliano Pieta <@Giuliano_Pieta> wrote:

i have sdl.lib and sdlmain.lib linked on the linker/input/additional
dependencies(visual studio pro 2005)

I sadly, only have VC6, and am unsure about any changes that may have been
introduced, etc in VS2005 et all. I’ll eventually get VC++ Express
installed in a virtual machine… but that is not today heh.

-Will


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org