Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 25/08/2008, à 16:11

zedtux

Compiler un code C# sous Linux.

Hello a tous.

Je voulais savoir si on peut compiler un programme écrit en C#, était facilement compilation sous Linux ou il faut changer des tas de trucs.. ?
( je sais que pour faire du .Net, il existe Mono )

Cette question car je recherche une solution pour utiliser mon iPhone sous linux. J'ai découvert aujourd'hui les manifiques outils windows, écrit en .NET : iphonelist et iphonebrowser.

Les codes sources étant ouvert ( Super les mecs ! Merci ! ), je me demandais si s'était pas une mauvaise idée de porter ca sous Linux, et why not, faire un paquet pour l'avoir dans Synaptic. big_smile


RECOLLER VOS FICHIERS XTM AVEC TUXTREMSPLIT !!
Adhérant April numéro 4985 [Rejoindre l'April moi aussi !].

Hors ligne

#2 Le 25/08/2008, à 17:27

tiky

Re : Compiler un code C# sous Linux.

Regarde le projet mono http://www.mono-project.com/Main_Page qui est de plus en plus utilisé dans Gnome. C'est un portage de la plateforme .NET sous Linux.

Dernière modification par tiky (Le 25/08/2008, à 17:27)


Conseil d'expert: il vous faut un dentifrice adapté...

Hors ligne

#3 Le 25/08/2008, à 18:00

zedtux

Re : Compiler un code C# sous Linux.

Oui ok, merci pour le lien ( je regarde là ), mais ma question est :

Est ce qu'un code C#.NET est facilement compilable sous Linux ( avec mono donc ) ou est ce une grosse galère ? big_smile


RECOLLER VOS FICHIERS XTM AVEC TUXTREMSPLIT !!
Adhérant April numéro 4985 [Rejoindre l'April moi aussi !].

Hors ligne

#4 Le 26/08/2008, à 12:24

TatrefThekiller

Re : Compiler un code C# sous Linux.

Installe gmcs (compilateur mono) et les dépendances asociées.
Puis

gmcs programme.cs

Sinon man gmcs big_smile

Hors ligne

#5 Le 26/08/2008, à 15:40

zedtux

Re : Compiler un code C# sous Linux.

OK, merci ! Je teste ce soir ! wink


RECOLLER VOS FICHIERS XTM AVEC TUXTREMSPLIT !!
Adhérant April numéro 4985 [Rejoindre l'April moi aussi !].

Hors ligne

#6 Le 26/08/2008, à 17:50

zedtux

Re : Compiler un code C# sous Linux.

J'ai réussi à le compiler asser facilement ... mais il ne fonctionne pas !
Je pense qu'il faut iTunesMobileDevice.dll... Mais je voie pas trop comment faire...

Unhandled Exception: System.DllNotFoundException: iTunesMobileDevice.dll
  at (wrapper managed-to-native) Manzana.MobileDevice:AMDeviceNotificationSubscribe (Manzana.DeviceNotificationCallback,uint,uint,uint,intptr&)
  at Manzana.MobileDevice.AMDeviceNotificationSubscribe (Manzana.DeviceNotificationCallback callback, UInt32 unused1, UInt32 unused2, UInt32 unused3, Manzana.AMDeviceNotification& notification) [0x00000] 
  at Manzana.iPhone..ctor () [0x00000] 
  at iPhoneGUI.iPhoneList..ctor () [0x00000] 
  at (wrapper remoting-invoke-with-check) iPhoneGUI.iPhoneList:.ctor ()
  at iPhoneGUI.Program.Main () [0x00000]

RECOLLER VOS FICHIERS XTM AVEC TUXTREMSPLIT !!
Adhérant April numéro 4985 [Rejoindre l'April moi aussi !].

Hors ligne

#7 Le 26/08/2008, à 18:12

TatrefThekiller

Re : Compiler un code C# sous Linux.

Le message d'erreur est à l'exécution ou à la compilation ?
Je pense que ça vient de la compilation. Il manque un bloc try/catch...

EDIT : En fait nan... ça vient bien d'une dll introuvable. Essaie de la trouver sur le net (dll-files.com) et de la placer dans le même dossier que l'exécutable.

Dernière modification par TatrefThekiller (Le 26/08/2008, à 18:14)

Hors ligne

#8 Le 26/08/2008, à 19:56

zedtux

Re : Compiler un code C# sous Linux.

Ben enffet je vient de voire qu'il ne fini pas la compilation totalement !

Compilation de la solution iPhoneApps

Compilation du projet: Manzana (Debug|Any CPU)
Exécution de la compilation principale...
Compilation succeeded - 20 warning(s)

/home/zedtux/Bureau/iphonelist/Manzana/iPhoneFile.cs(135,29): warning CS0219: The variable `ret' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/Manzana/iPhoneFile.cs(195,41): warning CS0219: The variable `ret' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(84,65): warning CS0169: The private field `Manzana.AMDeviceNotification.unknown0' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(85,65): warning CS0169: The private field `Manzana.AMDeviceNotification.unknown1' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(86,65): warning CS0169: The private field `Manzana.AMDeviceNotification.unknown2' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(87,49): warning CS0169: The private field `Manzana.AMDeviceNotification.callback' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(88,65): warning CS0169: The private field `Manzana.AMDeviceNotification.unknown3' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(121,24): warning CS0169: The private field `Manzana.afc_directory.unknown' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(126,22): warning CS0169: The private field `Manzana.afc_connection.handle' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(127,22): warning CS0169: The private field `Manzana.afc_connection.unknown0' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(128,22): warning CS0169: The private field `Manzana.afc_connection.unknown1' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(130,24): warning CS0169: The private field `Manzana.afc_connection.padding' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(131,22): warning CS0169: The private field `Manzana.afc_connection.unknown2' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(132,22): warning CS0169: The private field `Manzana.afc_connection.unknown3' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(133,22): warning CS0169: The private field `Manzana.afc_connection.unknown4' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(134,22): warning CS0169: The private field `Manzana.afc_connection.fs_block_size' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(135,22): warning CS0169: The private field `Manzana.afc_connection.sock_block_size' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(136,22): warning CS0169: The private field `Manzana.afc_connection.io_timeout' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(137,24): warning CS0169: The private field `Manzana.afc_connection.afc_lock' is never used
/home/zedtux/Bureau/iphonelist/Manzana/MobileDevice.cs(138,22): warning CS0169: The private field `Manzana.afc_connection.context' is never used


Compilation Terminée -- 0 Erreur, 20 Avertissements

Compilation du projet: iPhoneList (Debug|Any CPU)
Exécution de la compilation principale...
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/AboutBox.resx' avec resgen2.
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.resx' avec resgen2.
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/LinkProperties.resx' avec resgen2.
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/NewFolder.resx' avec resgen2.
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/Options.resx' avec resgen2.
Compilation de la ressource '/home/zedtux/Bureau/iphonelist/iPhoneGUI/Properties/Resources.resx' avec resgen2.
Compilation succeeded - 17 warning(s)

/home/zedtux/Bureau/iphonelist/iPhoneGUI/CoreFoundation.cs(83,37): warning CS0168: The variable `node' is declared but never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneApps.cs(295,24): warning CS0219: The variable `type' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/ItemProperties.cs(327,23): warning CS0168: The variable `bytesRead' is declared but never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/Links.cs(57,35): warning CS0168: The variable `node' is declared but never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(292,19): warning CS0219: The variable `oldLocation' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(738,30): warning CS0168: The variable `err' is declared but never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(907,34): warning CS0219: The variable `fileType' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(971,30): warning CS0219: The variable `result' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneApps.cs(39,23): warning CS0414: The private field `iPhoneList.iPhoneAppCategories.currentItem' is assigned but its value is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneApps.cs(212,24): warning CS0169: The private field `iPhoneList.SpringBoardNode.name' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneApps.cs(213,24): warning CS0169: The private field `iPhoneList.SpringBoardNode.identifier' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/Settings.cs(20,22): warning CS0169: The private method `iPhoneList.Properties.Settings.SettingChangingEventHandler(object, System.Configuration.SettingChangingEventArgs)' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/Settings.cs(24,22): warning CS0169: The private method `iPhoneList.Properties.Settings.SettingsSavingEventHandler(object, System.ComponentModel.CancelEventArgs)' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(274,22): warning CS0169: The private method `iPhoneGUI.iPhoneList.btnRefresh_Click(object, System.EventArgs)' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(490,24): warning CS0169: The private method `iPhoneGUI.iPhoneList.GetFileExt(string)' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(550,22): warning CS0169: The private method `iPhoneGUI.iPhoneList.folderToolStripMenuItem_Click(object, System.EventArgs)' is never used
/home/zedtux/Bureau/iphonelist/iPhoneGUI/iPhoneList.cs(733,24): warning CS0169: The private method `iPhoneGUI.iPhoneList.DecodePListFile(string)' is never used


Compilation Terminée -- 0 Erreur, 17 Avertissements

---------------------- Fini ----------------------

System.Deployment est introuvable ou est invalide.
Compilation : 0 Erreur, 37 Avertissements

Et apparement, System.Deployment n'est pas intégré à Mono... sad


RECOLLER VOS FICHIERS XTM AVEC TUXTREMSPLIT !!
Adhérant April numéro 4985 [Rejoindre l'April moi aussi !].

Hors ligne

#9 Le 29/08/2008, à 17:17

TatrefThekiller

Re : Compiler un code C# sous Linux.

C'est bon c'est juste des warnings... même si y'en a beaucoup, c'est rien.

Hors ligne