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

`int _mangled_main()' previously defined here

Ostatnio zmodyfikowano 2011-11-06 19:54
Autor Wiadomość
potrzebujepomocy
Temat założony przez niniejszego użytkownika
`int _mangled_main()' previously defined here
» 2011-11-06 19:28:27
Tworzę grę z kursem http://cpp0x.pl/kursy/Kurs-Allegro-C++/Klawiatura/68 i mam takie błędy :

 C:\Documents and Settings\monka\Pulpit\strona\Torchmen_lite\main.cpp In function `int _mangled_main()':

C:\Documents and Settings\monka\Pulpit\strona\Torchmen_lite\main.cpp In function `int _mangled_main()':

4 C:\Documents and Settings\monka\Pulpit\strona\Torchmen_lite\main.cpp `int _mangled_main()' previously defined here

 C:\Documents and Settings\monka\Pulpit\strona\Torchmen_lite\Makefile.win [Build Error]  [main.o] Error 1

oto mój code
C/C++
#include <allegro.h>

int main()
{
    allegro_init();
    install_keyboard();
    set_color_depth( 16 );
    set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0 );
    clear_to_color( screen, makecol( 10, 10, 10 ) );
   
    //char klawisz;
    int klawisz = 0;
   
    while( !key[ KEY_ESC ] )
    {
        klawisz = readkey();
        clear_to_color( screen, makecol( 10, 10, 10 ) );
        //textprintf( screen, font, 20, 20, makecol( 255, 255, 128 ), "Klawisz to : %d", klawisz );
    }
   
    allegro_exit();
    return 0;
}


int main()
{
    allegro_init();
    install_keyboard();
    set_color_depth( 16 );
    set_gfx_mode( GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0 );
    clear_to_color( screen, makecol( 128, 128, 128 ) );
   
    BITMAP * ludek = NULL;
   
    ludek = load_bmp( "ludek.bmp", default_palette );
    if( !ludek )
    {
        set_gfx_mode( GFX_TEXT, 0, 0, 0, 0 );
        allegro_message( "nie mogę załadować obrazka Ludek !" );
        allegro_exit();
        return 0;
    }
   
    blit( ludek, screen, 0, 0, 100, 100, ludek->w, ludek->h );
    readkey();
   
    allegro_exit();
    return 0;
}
END_OF_MAIN();
Pomóżcie

P-43490
pekfos
» 2011-11-06 19:30:37
masz 2 razy main(). wywal jedne. i nazywaj poprawnie tematy.
P-43491
m4tx
» 2011-11-06 19:54:26
Dokładnie, nie odstraszaj ludzi nazwą tematu... I zainteresuj się tym: » KursyKurs STC kurs
P-43503
« 1 »
  Strona 1 z 1