Panel użytkownika
Nazwa użytkownika:
Hasło:
Nie masz jeszcze konta?

[ALLEGRO] 4.2.2 mingw

Ostatnio zmodyfikowano 2012-10-06 18:46
Autor Wiadomość
Buczucza
Temat założony przez niniejszego użytkownika
[ALLEGRO] 4.2.2 mingw
» 2012-10-06 18:00:59
Zainstalowałem ALLEGRO dzięki poradnikowi:
http://szyx.cba.pl/index.php/allegro5-instalacja-i-konfiguracja-biblioteki-pod-codeblocks

Wszystko działało bez problemu, ale nie ma dobrych kursów na tę wersję biblioteki. Chciałem korzystać z waszej:
http://cpp0x.pl/kursy/Kurs-Allegro-4-x-C++/21

Postanowiłem więc wgrać 4.22, podmieniłem mbin/lib/include w MINGW i pozostało mi linkowanie do projektu debug i relase. Co podlinkować w tej wersji, bo w poradnik ujest podane tylko na v. 5:

liballegro-5.0.5-md.a
liballegro_image-5.0.5-md.a
liballegro_primitives-5.0.5-md.a
liballegro_font-5.0.5-md.a
liballegro_ttf-5.0.5-md.a
liballegro_audio-5.0.5-md.a

itd.

Używam C::B

Dziękuję za pomoc.
P-66183
pekfos
» 2012-10-06 18:13:13
do 4.2.2 wystarczy podlinkować alleg (
-lalleg
)
P-66186
Buczucza
Temat założony przez niniejszego użytkownika
» 2012-10-06 18:17:18
To samo wkleić do debuge i relase ? Oraz czy tu też ustawić statyczna lub dynamiczną bibliotekę ?
Bo wkleiłem -lalleg do debug i relase i ciągle ten sam błąd:

||=== allegro, Debug ===|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp||In function 'void init()':|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|3|error: 'allegro_init' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|4|error: 'desktop_color_depth' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|7|error: 'set_color_depth' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|8|error: 'GFX_AUTODETECT_WINDOWED' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|8|error: 'set_gfx_mode' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|10|error: 'allegro_error' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|10|error: 'allegro_message' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|11|error: 'exit' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|14|error: 'install_timer' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|15|error: 'install_keyboard' was not declared in this scope|
D:\CodeBlocks\Programy\GUI\allegro\Untitled1.cpp|16|error: 'install_mouse' was not declared in this scope|
||=== Build finished: 11 errors, 0 warnings ===|
P-66187
pekfos
» 2012-10-06 18:36:46
A jakie nagłówki dołączyłeś?
P-66188
Buczucza
Temat założony przez niniejszego użytkownika
» 2012-10-06 18:39:59
Wstawiłem do MINIGW te 3 foldery, no a do relase i debug dałem te -lalleg, po czym skompilowałem:

void init() {
    int depth, res;
    allegro_init();
    depth = desktop_color_depth();
    if( depth == 0 ) depth = 32;
  
    set_color_depth( depth );
    res = set_gfx_mode( GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0 );
    if( res != 0 ) {
        allegro_message( allegro_error );
        exit( - 1 );
    }
  
    install_timer();
    install_keyboard();
    install_mouse();
    /* add other initializations here */
}

I uzyskałem error: w poprzednim poście dałem.

Nic więcej nie zrobilem.

P-66189
SeaMonster131
» 2012-10-06 18:42:05
Wiesz co Ci się przyda? I od tego zacznij: » KursyKurs C++ kurs :)
Bo musisz dodać nagłówki, w tym wypadku bodajże allegro.h oraz musisz mieć "ciało programu", tj. funkcję int main().
P-66190
Gabes
» 2012-10-06 18:46:32
Zawartość include do include w MinGW, podobnie lib(zawartość lib do lib w MinGW), a w bin są dllki o które będzie prosił program.
P-66191
« 1 »
  Strona 1 z 1