![]() |
|
Trying to use allegro with devC++ via devpak |
mabufo
Member #9,968
July 2008
|
I've been very confused with trying to 'install' allegro. I found out that devc++ has a package manager tool that would do it for me. I'm not very good at all this sort of installation stuff so I thought that would be helpful. So i found a 'devpak' online here: http://devpaks.org/details.php?devpak=1 . I installed the pak, and I started a new, empty, project and tried to run this code: #include <allegro.h> int main(void) { allegro_init(); allegro_message("Hello World!"); return 0; } END_OF_MAIN()
I get these errors in my compile log: 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 Untitled1.o -o "Project1.exe" -L"C:/Dev-Cpp/lib" /mingw/lib/crt2.o(.text+0x167):crt1.c: undefined reference to `__cpu_features_init' Untitled1.o(.text+0x68):Untitled1.cpp: undefined reference to `_WinMain' make.exe: *** [Project1.exe] Error 1 Execution terminated Was there something else I was supposed to do after the devpak was installed? |
LennyLen
Member #5,313
December 2004
![]() |
You need to add liballeg.a as a linker option.
|
mabufo
Member #9,968
July 2008
|
How do I add that if I am using a devpak via the package manager? |
LennyLen
Member #5,313
December 2004
![]() |
It has nothing to do with the package manager. From memory (I no longer have Dev-C++ installed), one of the menu option is 'project options.' Try there.
|
hellochar
Member #9,969
July 2008
|
I had this exact same problem. The way I fixed it is by copying alleg42.dll from the bin folder into the C:\WINDOWS\system32 folder. |
LennyLen
Member #5,313
December 2004
![]() |
Quote: I had this exact same problem. The way I fixed it is by copying alleg42.dll from the bin folder into the C:\WINDOWS\system32 folder. That won't do anything to fix his problem.
|
mabufo
Member #9,968
July 2008
|
I don't see the liballeg.a file anywhere in my file tree. I know that it exists within the devpak though\, I just can't seem to get to it. |
LennyLen
Member #5,313
December 2004
![]() |
Quote: I don't see the liballeg.a file anywhere in my file tree. I know that it exists within the devpak though\, I just can't seem to get to it. Windows does come with a file search.
|
mabufo
Member #9,968
July 2008
|
I was under the impression that it would work properly after installing the devpak. what additional steps are needed? |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: what additional steps are needed? It was already mentioned. You need to tell your project to link to allegro. -- |
mabufo
Member #9,968
July 2008
|
My question is, how do I do that with a DEVPAK installation of allegro? EDIT: Problem solved, the trouble was that I had more than one installation of Mingw... I didn't realize devc++ installed it as well. |
|