-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executer du Code C depuis Windows (issue #23) #24
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
layout: post | ||
title: Executer du code C depuis Windows sans passer par Virtualbox | ||
author: Andru Onciul | ||
--- | ||
|
||
#Installer Ubuntu | ||
|
||
1) Installer Ubuntu depuis le Windows Store | ||
![Publish]({{ site.baseurl }}/images/UbuntuWindowsStore.PNG) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ou vous remplacez PNG par png, ou vous adaptez le nom de l'image, mais jekyll n'affiche rien sinon |
||
|
||
1.1) Si cette erreur apparait: | ||
![Publish]({{ site.baseurl }}/images/ErreurSubSystemComponent.PNG) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idem que ci-dessus. Aussi je trouve qu'une image n'est pas nécessaire ici, un bout de code peut faire l'affaire genre
|
||
|
||
|
||
taper cette ligne dans le powershell de windows (executer en tant que administrateur sinon ca marchera pas) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exécuter en tant qu'administrateur sinon cela ne marchera pas |
||
|
||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | ||
|
||
2) une fois ubuntu installé : | ||
2.1) choisir un username (minuscule sans espaces) et | ||
2.2) un code (a ne pas perdre) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. à ne pas perdre |
||
|
||
#Taper ces lignes de commandes dans Ubuntu | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idem, espace après # |
||
|
||
cd /mnt/c #va sur le disque dur C: du pc | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mettez les commandes entre |
||
![Publish]({{ site.baseurl }}/images/mountCs.PNG) | ||
|
||
Vous êtes maintenant sur les fichiers du disque dur(C:) principal de votre pc. | ||
Vous pouvez utiliser dans ce bash comme le bash d'un système UNIX puisque ca en est un. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. c'en est un. |
||
|
||
Pour la première fois sur le bash il va falloir installer le compilateur ainsi que | ||
toutes les librairies qui seront utilisées dans les codes qui seront compiler. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. compilés. |
||
Ces lignes de commandes ne devront être taper que la première fois (tout reste installer même si le bash ubuntu est fermé) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tapées que la première fois (tout reste installé |
||
sudo apt-get update #update toutes les libraires | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mettre dans un ``` There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aussi, pourquoi autant d'espace entre les commentaires et la commande? Pourquoi ne pas mettre le commentaire au dessus de la commande? |
||
#ubuntu demande le code du l’utilisateur du pc il suffit de le tapper et taper ENTER | ||
|
||
|
||
sudo apt-get install build-essential #compilateur et debug (notamment commande gcc) | ||
sudo apt-get install make #pouvoir utiliser des make | ||
sudo apt-get install manpages-dev #documentation | ||
|
||
Voici quelques librairies indispensables pour le projet a vous d'en mettre plus si besoin. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. à vous |
||
Il suffit de taper ubuntu install "nom de la librairie sur google" pour trouver la commande a taper | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. à taper There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sinon apt-cache search marche bien aussi... |
||
sudo apt-get install valgrind #valgrind | ||
sudo apt-get install cppcheck #cppcheck | ||
sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev #cunit | ||
sudo apt-get install zlib1g-dev #librairies et headers | ||
|
||
|
||
#Exécuter la commande du makefile comme dans un terminal linux | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idem, espace après # Linux |
||
|
||
Maintenant il vous suffit d’ouvrir Ubuntu et de taper ca a chaque fois que vous voulez lancer votre code : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. et de taper ceci à chaque fois |
||
|
||
cd /mnt/c #va sur le disque dur C: du pc | ||
cd “fichier ou ya le projet” #rentre dans le bon fichier | ||
make fact | ||
./fact -N 4 input.txt output.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deux choses:
1- Mettez une introduction à votre blogpost plutôt que directement un titre. Le premier paragraphe sera visible sur la page d'accueil du blog, qui pour le moment montrera juste "Installer Ubuntu"
2- Mettre un espace entre # et Installer, sinon pas de formatage