| | |
C++ compiler
![]() |
•
•
Join Date: Oct 2007
Posts: 18
Reputation:
Solved Threads: 0
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!
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.
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!

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.
>>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.
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.
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
Compilers
Code::Blocks
MSVC++ Express
Open Watcom C++/Fortran
Bloodshed DevC
Borland 5.5
Don't use Vista but they all work on XP.
Code::Blocks
MSVC++ Express
Open Watcom C++/Fortran
Bloodshed DevC
Borland 5.5
Don't use Vista but they all work on XP.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
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.
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
•
•
Join Date: Oct 2007
Posts: 18
Reputation:
Solved Threads: 0
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
But... it could be a wrong setup, because i'm new and don't know anything about importing libraries
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

But... it could be a wrong setup, because i'm new and don't know anything about importing libraries
Were you using devpaks? If not, I suggest you try it as generally it's quite easy to install devpak libraries. http://devpaks.org/category.php?category=SDL
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
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.
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
![]() |
Similar Threads
- C++ Compiler??? (C++)
- C compiler... Man I feel lame (*nix Software)
- compiler (C++)
- ?'s, JPG, Free Store and Compiler Synthesis (C)
Other Threads in the C++ Forum
- Previous Thread: Calculating the cardinality of an array
- Next Thread: A C++ CGI Problem
Views: 2746 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for C++
algorithm api array arrays assignment basic beginner binary c++ c/c++ calculator char class classes code command compile compiler console constructor conversion convert count data delete desktop dll dynamic encryption error file files fstream function functions game givemetehcodez graph gui homework http i/o iamthwee image input int lazy library linker list loop looping math matrix member memory newbie number numbers object objects opengl output parameter pointer pointers problem program programming project random read recursion recursive reference search sort sorting spoonfeeding string strings struct student studio template templates text time tree variable vc++ vector video visual visualstudio void win32 window windows winsock






