Lately i've been having some problems, importing an SDL library, into my compiler, and as a result of that i have chosen to change to a new compiler. I have followed 3 differend online tutorials, re-installed the compiler three times, and done it with three different downloads of the SDL library, so i'm sure it's not just some weird mistake. I keep getting the following errors:
multiple definition of `main'
first defined here
.drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
[Linker error] undefined reference to `_alloca_probe'
[Linker error] undefined reference to `SDL_main'
[Linker error] undefined reference to `_alloca_probe'
[Linker error] undefined reference to `_alloca_probe'
ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Nuskaldetvirke.exe] Error 1
The [Linker error] undefined reference to `SDL_main' errer, however i know how to remove...
I get all these errors without no source code! :S
So, as i said, i'm thinking of changing compiler, because i simply don't tihnk this compielr works with Vista or something... because all three times it has been the same result, and all the times i have used a new: Tutorial, in how to import the SDL library, new installation of the compiler and new download of the library.
And i haven't "cross used" them, so it should be pretty clear that none of those are the problems.
If any1 have a suggestion on how to correct the errors, please tell me.
Otherwise, could any1 suggest a free c++ compiler, that works fine on vista.

Recommended Answers

All 9 Replies

>>could any1 suggest a free c++ compiler, that works fine on vista.
VC++ 2005 Express and Dev-C++ are just two of them. Borland ++ probably also works but I have not tried it.

As for your problem what compiler(s) have you tried. If its pretty current (not ancient Turbo C) then I doubt the problem is your compiler but the way you have it set up. Post a link to where you got that library and post your program.

Well I'm pretty certain your problem is the way you have your environment set up because I downloaded and installed the SDL lib source, sompiled it, then ran one of the tutorials I found here. I used VC++ 2005 Express compiler with the Windows SDK and DirectX SDK installed.

Kk dragon, thx. I will try your mwthod as well.
I was using dev-c++ before. But the reason i don't tihnk it had a wrong setup is, as i said, i followed three different tutorials, and had the same result (The same errors) each time :S

But... it could be a wrong setup, because i'm new and don't know anything about importing libraries :S

Are Windows SDK and DirectX SDK installed necessary, for both VC++ and dev-c++?

WEll... yeah, i tried with devpacks as well...

Are Windows SDK and DirectX SDK installed necessary, for both VC++ and dev-c++?

For VC++ 2005 Express yes, don't know about DEV-C++. After you have downloaded and installed them you have to configure the compiler's IDE with the paths to the include and lib directories.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.