<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Der Blog von Benny Neugebauer &#187; C, C++</title>
	<atom:link href="http://www.bennyn.de/programmierung/c/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bennyn.de</link>
	<description>Alles über die Informatik &#38; Co.</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:49:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SVN SSH post-commit checkout hook</title>
		<link>http://www.bennyn.de/programmierung/c/svn-ssh-post-commit-checkout-hook.html</link>
		<comments>http://www.bennyn.de/programmierung/c/svn-ssh-post-commit-checkout-hook.html#comments</comments>
		<pubDate>Fri, 20 Aug 2010 00:49:18 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[C, C++]]></category>
		<category><![CDATA[Virtual Server]]></category>
		<category><![CDATA[Checkout]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=1562</guid>
		<description><![CDATA[Wenn man mit SVN ein Webprojekt versioniert, dann ist es wünschenswert, den aktuellen Stand auch live auf einem Webserver im Internet zu haben. Dieser Wunsch lässt sich mit sogenannten &#8220;hooks&#8221; realisieren. In jedem SVN Projektordner gibt es einen Unterordner namens &#8220;hooks&#8221;. In diesem Ordner sind Shell-Skripte für verschiedene Momente abgelegt. Diese Scripte werden zum jeweiligen [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn man mit <b>SVN</b> ein <b>Webprojekt</b> versioniert, dann ist es wünschenswert, den aktuellen Stand auch live auf einem Webserver im Internet zu haben. Dieser Wunsch lässt sich mit sogenannten &#8220;<b>hooks</b>&#8221; realisieren. In jedem SVN Projektordner gibt es einen Unterordner namens &#8220;hooks&#8221;. In diesem Ordner sind Shell-Skripte für verschiedene Momente abgelegt. Diese Scripte werden zum jeweiligen Zeitpunkt automatisch vom SVN Server aufgerufen.</p>
<p>Das <b>post-commit</b>-Skript wird direkt nach einem Commit ausgeführt und bietet sich hervorragend an, um direkt nach einer Projekt-Änderung den aktuellen Stand für den Webserver zur Verfügung zu stellen. Dazu muss man im Skript nur festlegen, dass ein checkout in das gewünschte Web-Verzeichnis ausgeführt werden soll. Wie das geht, zeige ich im folgenden Artikel.<br />
<span id="more-1562"></span></p>
<h2>Vorab:</h2>
<p>Mein Beispiel geht davon aus, dass sich alle <b>SVN-Benutzer</b> mit einem <b>privaten Schlüssel</b> über <b>svn+ssh</b> am Server anmelden um ihre Aktionen auszuführen. Das führt dazu, dass der post-commit hook immer mit dem Benutzerkonto ausgeführt wird, der gerade einen Commit begangen hat. Wenn post-commit nun die Aufgabe hat, einen <b>automatischen Checkout</b> auf dem Webserver zu machen, kommt es standardmäßig dazu, dass die Dateien beim Checkout alle dem Benutzer gehören, der den Commit gemacht hat. Wenn man mit mehreren SVN-Benutzern arbeitet kommt es zu einem Problem. Den anderen Benutzern fehlen die nötigen Rechte, um die Checkout-Dateien für das <b>Webverzeichnis</b> zu ändern. Zudem gibt es noch ein weiteres Problem. Damit das Webprojekt erfolgreich im Internet bedient werden kann, sollte das Webverzeichnis, in das ausgecheckt wird, dem Apache-Webserver gehören. Man kann zwar für den <b>svn checkout</b> Befehl einen Benutzer und ein Passwort festlegen, damit der Checkout immer über dasselbe Benutzerkonto ausgeführt wird, allerdings authentifizieren sich die SVN-Benutzer (wie bereits erwähnt) nicht über ein Passwort, sondern über einen Schlüssel. Trotzdem gibt es eine Lösung dafür.</p>
<h2>Struktur:</h2>
<p>Der Apache-Webserver läuft unter dem Benutzerkonto: www-data<br />
Das SVN-Repository liegt in: /srv/svn/st38<br />
Das Web-Verzeichnis ist: /srv/www/st38<br />
Die ausführbare SVN-Datei ist: /usr/bin/svn<br />
Alle SVN-Benutzer sind in der Gruppe: svn</p>
<h2>Quellcode:</h2>
<p>Meine Lösung benötigt zwei Dateien. Das Skript für den post-commit hook sowie ein Programm für das automatische svn update. Damit es während der Einrichtung keine Probleme gibt, hier schon mal die Quelltexte.</p>
<p><b>post-commit</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #666666; font-style: italic;"># REPO	- Path to the repository</span>
<span style="color: #666666; font-style: italic;"># REV	- Current revision number of the repository</span>
<span style="color: #666666; font-style: italic;"># USER	- Name of the user who did the commit</span>
<span style="color: #666666; font-style: italic;"># DATE	- Time of the commit</span>
&nbsp;
<span style="color: #007800;">REPO</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #007800;">REV</span>=<span style="color: #ff0000;">&quot;$2&quot;</span>
<span style="color: #007800;">USER</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">whoami</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">DATE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d.%m.%Y, %H:%Mh&quot;</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>st38<span style="color: #000000; font-weight: bold;">/</span>hooks<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>st38
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DATE</span> - User <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$USER</span><span style="color: #000099; font-weight: bold;">\&quot;</span> committed Revision <span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #007800;">$REV</span><span style="color: #000099; font-weight: bold;">\&quot;</span>.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>st38<span style="color: #000000; font-weight: bold;">/</span>post-commit.log</pre></td></tr></table></div>

<p>Der <b>post-commit</b> hook ruft das Programm <b>svn-update</b> auf. Dabei wird als erster Parameter der Pfad zur ausführbaren svn-Datei angegeben. Als zweiter Parameter folgt der Pfad zum Webverzeichnis, in das ausgecheckt werden soll. Nach Ausführung dieses Programms erstellt der hook noch eine Logdatei, um zu sehen wer eine Revision eingecheckt hat und wann diese Revision erstellt wurde.</p>
<p><b>svn-update.c</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;stddef.h&gt;</span>
<span style="color: #339933;">#include &lt;stdlib.h&gt;</span>
<span style="color: #339933;">#include &lt;unistd.h&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
 argv[1] - Path to the svn executable
 argv[2] - Path to the web-directory
*/</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">char</span><span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>	
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>argc <span style="color: #339933;">==</span> <span style="color: #0000dd;">3</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #993333;">char</span> <span style="color: #339933;">*</span>newenv <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> NULL <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		execle<span style="color: #009900;">&#40;</span>argv<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;svn&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;update&quot;</span><span style="color: #339933;">,</span> argv<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
				<span style="color: #ff0000;">&quot;--non-interactive&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;--accept&quot;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;theirs-full&quot;</span><span style="color: #339933;">,</span>
				NULL<span style="color: #339933;">,</span> newenv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span>EXIT_FAILURE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span>EXIT_SUCCESS<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Die Datei <b>svn-update.c</b> ist ein C-Programm und muss erst noch kompiliert werden (siehe <a href="http://www.bennyn.de/programmierung/c/gcc-installieren-und-c-kompilieren.html" title="GCC installieren und C kompilieren">GCC installieren und C kompilieren</a>). Das Programm sorgt dafür, dass svn update immer vom selben Benutzer ausgeführt wird.</p>
<h2>Einrichtung</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> usermod <span style="color: #660033;">-a</span> <span style="color: #660033;">-G</span> <span style="color: #c20cb9; font-weight: bold;">svn</span> www-data
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>st38<span style="color: #000000; font-weight: bold;">/</span>hooks
<span style="color: #c20cb9; font-weight: bold;">scp</span> post-commit.tmpl post-commit
<span style="color: #c20cb9; font-weight: bold;">vim</span> post-commit
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> 0770 post-commit
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #c20cb9; font-weight: bold;">svn</span> post-commit
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> 0770 .<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #c20cb9; font-weight: bold;">svn</span> .<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">touch</span> .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update.c
<span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-o</span> .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update.c
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">6750</span> .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:<span style="color: #c20cb9; font-weight: bold;">svn</span> .<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svn-update
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>st38
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #c20cb9; font-weight: bold;">file</span>:<span style="color: #000000; font-weight: bold;">///</span>srv<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>st38
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> 0775 <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>st38
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> www-data:<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #000000; font-weight: bold;">/</span>srv<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>st38</pre></td></tr></table></div>

<ol>
<li>Apache-Benutzer der Gruppe &#8220;svn&#8221; hinzufügen<br />
<u>Tipp:</u> Mit dem Kommando <b>sudo id www-data</b> kann überprüft werden, in welchen Gruppen der Benutzer ist</li>
<li>In das &#8220;hooks&#8221;-Verzeichnis des Repository wechseln</li>
<li>&#8220;post-commit&#8221;-Hook aus Template kopieren</li>
<li>post-commit bearbeiten (Quelltext einfügen!)</li>
<li>Verzeichnisrechte für &#8220;post-commit&#8221; setzen</li>
<li>Neuen Besitzer für &#8220;post-commit&#8221; setzen</li>
<li>Ordner &#8220;bin&#8221; erstellen</li>
<li>Verzeichisrechte für Ordner &#8220;bin&#8221; setzen</li>
<li>Neuen Besitzer für Ordner &#8220;bin&#8221; setzen</li>
<li>Datei &#8220;svn-update.c&#8221; erstellen (Quellcode einfügen nicht vergessen!)</li>
<li>&#8220;svn-update.c&#8221; zu &#8220;svn-update&#8221; kompilieren (siehe <a href="http://www.bennyn.de/programmierung/c/gcc-installieren-und-c-kompilieren.html" title="GCC installieren und C kompilieren">GCC installieren und C kompilieren</a>)</li>
<li>CHMOD für &#8220;svn-update&#8221; setzen (Achtung! 6750!)</li>
<li>Besitzer für &#8220;svn-update&#8221; ändern (es muss der Apache-User sein!)</li>
<li>Web-Verzeichnis für das Repository anlegen</li>
<li>&#8220;Vor&#8221; das eigentliche Webverzeichnis wechseln</li>
<li>Initialen Checkout machen</li>
<li>CHMOD setzen</li>
<li>Besitzer ändern</li>
</ol>
<h2>Ergebnis</h2>
<p>Sobald ein SVN-Benutzer nun über seinen SVN-Client einen Commit macht, wird das Repository (/srv/svn/repos/st38) aktualisiert und der neue Stand im Webverzeichnis (/srv/www/st38) eingefügt. Die Dateien im Webverzeichnis gehören alle dem Webserver (www-data) und können so bequem über das Internet abgerufen werden (sofern ein gültiger Directory-Eintrag besteht). Außerdem wird eine Logdatei im Webordner angelegt.</p>
<p>Vielen Dank an <b>gpinzone</b> aus der <a href="http://subversion.wandisco.com/">Subversion Community by WANdisco</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/c/svn-ssh-post-commit-checkout-hook.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GCC installieren und C kompilieren</title>
		<link>http://www.bennyn.de/programmierung/c/gcc-installieren-und-c-kompilieren.html</link>
		<comments>http://www.bennyn.de/programmierung/c/gcc-installieren-und-c-kompilieren.html#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:21:46 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[C, C++]]></category>
		<category><![CDATA[Collection]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[installieren]]></category>
		<category><![CDATA[kompilieren]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=1552</guid>
		<description><![CDATA[Auf einem Debian Server ist die Installation der GNU Compiler Collection (kurz GCC) sehr einfach: 1 2 3 sudo apt-get update sudo apt-get upgrade sudo apt-get install gcc Sobald die GCC installiert ist, kann man C-Programme kompilieren. Zum Testen eignet sich dieses kleine &#8220;Hello World&#8221;-Programm: quellcode.c 1 2 3 4 5 6 7 #include &#60;stdio.h&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Auf einem <strong>Debian Server</strong> ist die Installation der <strong>GNU Compiler Collection</strong> (kurz GCC) sehr einfach:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span></pre></td></tr></table></div>

<p><span id="more-1552"></span><br />
Sobald die <strong>GCC</strong> installiert ist, kann man <strong>C-Programme</strong> kompilieren. Zum Testen eignet sich dieses kleine &#8220;Hello World&#8221;-Programm:</p>
<p><b>quellcode.c</b></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;stdio.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">printf</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Hello, World!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Mit den folgenden Befehlen kann man die Datei &#8220;quellcode.c&#8221; nun in eine ausführbare Datei namens &#8220;hello&#8221; übersetzen und ausführen:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">gcc <span style="color: #339933;">-</span>o hello quellcode.<span style="color: #202020;">c</span>
.<span style="color: #339933;">/</span>hello</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/c/gcc-installieren-und-c-kompilieren.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GCC &#8211; incompatible implicit declaration</title>
		<link>http://www.bennyn.de/programmierung/c/gcc-incompatible-implicit-declaration.html</link>
		<comments>http://www.bennyn.de/programmierung/c/gcc-incompatible-implicit-declaration.html#comments</comments>
		<pubDate>Thu, 19 Aug 2010 17:09:17 +0000</pubDate>
		<dc:creator>bennyn</dc:creator>
				<category><![CDATA[C, C++]]></category>
		<category><![CDATA[Virtual Server]]></category>
		<category><![CDATA[declaration]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[incompatible]]></category>
		<category><![CDATA[kompilieren]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.bennyn.de/?p=1545</guid>
		<description><![CDATA[Wenn beim Kompilieren mit der GNU Compiler Collection (GCC) die Warnung: &#8220;warning: incompatible implicit declaration of built-in function&#8221; auftritt, dann wird eine Funktion im Quelltext verwendet, obwohl diese noch nicht definiert wurde. Wenn dieser Fehler bei der Verwendung von printf auftritt, dann kann es daran liegen, dass die Standard Ein -und Ausgabe noch nicht eingebunden [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn beim Kompilieren mit der <strong>GNU Compiler Collection</strong> (GCC) die Warnung: &#8220;<strong>warning: incompatible implicit declaration of built-in function</strong>&#8221; auftritt, dann wird eine Funktion im Quelltext verwendet, obwohl diese noch nicht definiert wurde.</p>
<p>Wenn dieser Fehler bei der Verwendung von <strong>printf</strong> auftritt, dann kann es daran liegen, dass die <strong>Standard Ein -und Ausgabe</strong> noch nicht eingebunden wurde. Ein einfaches <strong>#include &lt;stdio.h&gt;</strong> im Quellcode des Programms hilft hier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bennyn.de/programmierung/c/gcc-incompatible-implicit-declaration.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

