Portál AbcLinuxu, 30. dubna 2025 14:00
Tak to gratuluji, já tolik úspěchu neměl. Zrovna ve čtvrtek jsem se chtěl taky na Mono podívat a moc úspěšný jsem nebyl. Když pustím Monodevelop na tu tvojí prvotinu, tak dopadnu nějak tak takhle:
Sestavuji sestavu: dotgame-gladesharp Sestavuji projekt: dotgame-gladesharp Konfigurace: Release Performing main compilation... Try using -pkg:gdk-sharp Try using -pkg:gdk-sharp Try using -pkg:gtk-sharp Try using -pkg:gtk-sharp Try using -pkg:glade-sharp Try using -pkg:glade-sharp Try using -pkg:gdk-sharp Try using -pkg:gdk-sharp Try using -pkg:gtk-sharp Try using -pkg:gtk-sharp Try using -pkg:glade-sharp Try using -pkg:glade-sharp Try using -pkg:gtk-sharp Try using -pkg:gtk-sharp Compilation failed: 14 error(s), 0 warnings /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(20,7): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(20,1): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(21,7): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(21,1): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(22,7): error CS0246: The type or namespace name `Glade' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/BoardWindow.cs(22,1): error CS0246: The type or namespace name `Glade' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(20,7): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(20,1): error CS0246: The type or namespace name `Gdk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(21,7): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(21,1): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(22,7): error CS0246: The type or namespace name `Glade' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/Cell.cs(22,1): error CS0246: The type or namespace name `Glade' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/MessageBoxWindow.cs(20,7): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? /home/brouk/Devel/Mono/dotgame-gladesharp/MessageBoxWindow.cs(20,1): error CS0246: The type or namespace name `Gtk' could not be found. Are you missing a using directive or an assembly reference? Sestavení dokončeno -- 14 chyb. 0 varování -------------------- Dokončeno -------------------- gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f could not be found or is invalid. gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f could not be found or is invalid. glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f could not be found or is invalid. glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f could not be found or is invalid. pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f could not be found or is invalid. Sestavení: 14 chyb, 0 varování.
Když na ty zdrojáky pustím mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0
, tak se binárky dočkám. Vidím tu rozpor mezi v úvodu vypsaným using -pkg:gtk-sharp
a mým -pkg:gtk-sharp-2.0
, ale nikde v nastavení Monodevelop jsem si nevšiml, jak to ovlivnit a zkoušet hýbat verzemi se mi moc nechce, i když to možná povede k cíli, podle toho, co jsem zatím vygooglil.
Pokud neumíte jazyk, bude pro Vás těžké začínat v jakémkoli prostředí. Co se týče začátků a učení jazyka, určitě bych Monodevelop doporučil. Dost věcí lze naklikat, ale nemůžete zakládat na ničem.
Součástí balíku Mona by měl být Monodoc, což je poměrně rozsáhlá dokumentace knihovních tříd a nějaké články. Trochu podobné MSDN jedné redmondské firmy.
Pro začínající programátory v C# doporučuju knihu "Od C++ k C#", kterou napsal Miroslav Virius. Vůbec nemusíte znát C++. Stačí obecné znalosti programování. Přímočařejší knihu o C# neznám. Mám doma ještě nějaké od zahraničních autorů, ale to se vůbec nedá srovnávat.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.