Jump to content

  • Log In with Google      Sign In   
  • Create Account

allegro game library


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 fender0613   Members   -  Reputation: 100

Like
0Likes
Like

Posted 20 December 2010 - 02:36 PM

Hi everyone, new here with some experience in c++ programming. Ive currently only been using borland products for a few years, and am learning to work with DEV C++. I just installed the Allegro game library, and am having trouble compiling a project , that my friend has not trouble running on his machine,i use windows vista. I know the code is correct, the error says

[Linker error] undefined reference to `WinMain@16'

C:\Dev-Cpp\Makefile.win [Build Error]
[lib/allegro/lib/liballeg/Project2.exe] Error 1

I have tried to set the parameters of the project to include liballeg.a , i cannot seem to get this to compile or run. Any assistance or help would be greatly appreciated!


thanks!

Sponsor:

#2 Dragonsoulj   Crossbones+   -  Reputation: 2126

Like
0Likes
Like

Posted 20 December 2010 - 02:49 PM

Did you install Allegro in the proper folders?

#3 zerothrillz   Members   -  Reputation: 152

Like
0Likes
Like

Posted 20 December 2010 - 03:40 PM

the only additional build parameter you should have to supply is -lalleg, and the compiler will know to look for liballeg.a automatically. Where and how did you install the allegro files? Did you configure dev-c++ to look in the correct places?

#4 Dragonsoulj   Crossbones+   -  Reputation: 2126

Like
0Likes
Like

Posted 20 December 2010 - 03:52 PM

I know I had a few issues getting it to work initially. If you did put the files in the right place, try reinstalling it. Dev-C++ does have a few issues.

#5 vleugel   Members   -  Reputation: 252

Like
0Likes
Like

Posted 21 December 2010 - 06:58 AM

Try using Visual Studio 2010 expres, which is free as well and far superior to dev-cpp.

May I also ask why you choose for Allegro? Do you already have experience with Allegro or do you want to follow tutorials that use it? If not, I'd recommend using SFML instead. SFML is a multimedia library rather than a game library, but it can basicly do the same thing and is doing the job probably a little bit better with regards to performance and support. SFML is still being updated while Allegro is getting out-dated. I don't want to push you into one direction but I just want to make sure you know there are alternatives.

With regards to your question, are you sure that you've used END_OF_MAIN() in the end?

Kind regards,
Rob

#6 sindisil   Members   -  Reputation: 383

Like
0Likes
Like

Posted 21 December 2010 - 07:49 AM

Not that there's anything *wrong* with SFML, per se, but I'm not sure where you get the idea that Allegro is "getting a little outdated". Allegro 5 RC3 was released just a few days ago. It includes hardware acceleration and a new modular architecture.

I'd say that Allegro is still *very* much worth considering.

#7 vleugel   Members   -  Reputation: 252

Like
0Likes
Like

Posted 21 December 2010 - 08:46 AM

Quote:
Original post by sindisil
Not that there's anything *wrong* with SFML, per se, but I'm not sure where you get the idea that Allegro is "getting a little outdated". Allegro 5 RC3 was released just a few days ago. It includes hardware acceleration and a new modular architecture.

I'd say that Allegro is still *very* much worth considering.


Hm I had the impression that Allegro wasn't being updated anymore, but I guess I was wrong about this matter. It seems I was looking at the wrong allegro page (http://www.talula.demon.co.uk/allegro/ instead of http://alleg.sourceforge.net/) but even than there was still an update this year.

my bad

#8 sindisil   Members   -  Reputation: 383

Like
0Likes
Like

Posted 21 December 2010 - 10:17 AM

Or you could just use the shorter, official URL: http://allegro5.org/.

#9 fender0613   Members   -  Reputation: 100

Like
0Likes
Like

Posted 21 December 2010 - 11:46 AM

I believe that I installed everything correctly. Ive told the linker to include liballeg.a, but Iam finding no file name -lalleg ?? I have also included END_OF_MAIN() at the end of the source code file..

im still recieving a builder error.

C:\Dev-Cpp\Makefile.win [Build Error] [Project2.dll] Error 1

any help greatly appreciated

its saying thats its using mingw to compile it, but cant find a list of files in my directory

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make clean
rm -f lib/main.o Untitled1.o Project1.exe

g++.exe -c lib/main.cpp -o lib/main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

g++.exe -c Untitled1.cpp -o Untitled1.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

g++.exe lib/main.o Untitled1.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" -mwindows -lalleg_s -lgdi32 lib/-ldxguid lib/-lole32 lib/-ldinput lib/-lddraw lib/-lwinmm lib/-ldsound lib/-DALLEGRO_STATICLINK

g++.exe: lib/-ldxguid: No such file or directory
g++.exe: lib/-lole32: No such file or directory
g++.exe: lib/-ldinput: No such file or directory
g++.exe: lib/-lddraw: No such file or directory
g++.exe: lib/-lwinmm: No such file or directory
g++.exe: lib/-ldsound: No such file or directory
g++.exe: lib/-DALLEGRO_STATICLINK: No such file or directory

make.exe: *** [Project1.exe] Error 1

Execution terminated


[Edited by - fender0613 on December 21, 2010 6:46:41 PM]

#10 jbadams   Senior Staff   -  Reputation: 19331

Like
0Likes
Like

Posted 21 December 2010 - 06:36 PM

Firstly, you should get some more up-to-date tools so that you're not dealing with compiler or IDE bugs. See Why you shouldn't use Dev-C++. A recent Visual C++ Express Edition or Code::Blocks would be excellent choices.

Once you're using something at least vaguely modern and currently supported we're much more likely to be able to help you with getting Allegro up and running correctly if you're still experiencing any issues.

#11 fender0613   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 December 2010 - 05:22 PM

ok iam now using code blocks, and there are no errors anymore except for one which im unclear about


install_allegro_version_check

this is the build error

what can I do to see if there are more than one version of allegro on my computer? how i can I delete one without affecting my settings.

#12 relsoft   Members   -  Reputation: 255

Like
0Likes
Like

Posted 23 December 2010 - 06:00 PM

Quote:
Original post by fender0613
ok iam now using code blocks, and there are no errors anymore except for one which im unclear about


install_allegro_version_check

this is the build error

what can I do to see if there are more than one version of allegro on my computer? how i can I delete one without affecting my settings.


Good Choice! Another alternative is CodeLite.

Anyways, Code::Blocks also supports Devpacks so you can install your allegro devpack in it and see if you still get errors.




#13 fender0613   Members   -  Reputation: 100

Like
0Likes
Like

Posted 24 December 2010 - 03:25 AM

I still have no idea what im doing wrong, i looked on my computer to see if there were two versions of allegro and there were. I deleted both and reinstalled it, my codeblocks is still saying the same error. I dont know where to go from here.
all my compiler settings are correct.

what does this error mean anyways?


#14 Trumgottist   Members   -  Reputation: 105

Like
0Likes
Like

Posted 01 January 2011 - 10:37 PM

The error indicates that you still have two versions of the library. When are you getting the error? If it's when you try to run your program, you're trying to run it with the wrong version of the dll. (In that case, you probably have one in a system folder.)

Edit: I saw your other thread, that has a bit more information. (Don't post the same problem in multiple threads! It's just confusing.) I agree with what LennyLen says there.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS