<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Code::Blocks and Enet</title>
		<link>http://www.allegro.cc/forums/view/618684</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 17 Jun 2022 16:39:22 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Gaaaaah, I&#39;m losing my mind over this. I&#39;m trying to set up enet in Code::Blocks and having problems. I followed the instructions on the <a href="http://enet.bespin.org/Installation.html">Enet</a> website, ie ./configure &amp;&amp;make &amp;&amp;make install and everything seemed to work. When trying to run the sample programs, I found I had a linker problem. After some searching, I found &lt;a href=&quot;<a href="https://forums.codeblocks.org/index.php?topic=18235.0&quot;&gt;this">https://forums.codeblocks.org/index.php?topic=18235.0&quot;&gt;this</a> on the Code::Blocks forums suggesting to open the enet_dll.cpb project and run build to create the libraries. I tried but got an error in the unix.c file, &quot;error: conflicting types for &#39;socklen_t&#39;; have &#39;int&#39;&quot;. I&#39;ve used the files in the enet_dll project as downloaded, no editing. Are the instructions in the Code::Blocks post specific to the OP&#39;s situation, or should I be changing the Enet files to make it work? Thanks.</p><p>&lt;update&gt; After some searching, I found the library files in a hidden folder. For anyone looking for the libraries in Linux, the path is .../Documents/enet-1.3.17/.libs, assuming the enet file is under the Documents folder. However, I still can&#39;t compile.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Keane)</author>
		<pubDate>Sun, 12 Jun 2022 21:25:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Bob - relax!</p><p>Use cmake-gui instead of autobarf. Always prefer cmake to autotools. Unless they just work, but even then....</p><p>I tweaked my CMakeLists.txt a little for Enet to produce a shared and static version and an install target. You can find it attached. Just overwrite the existing CMakeLists.txt file and run as normally. It will install the libraries in ${CMAKE_INSTALL_PREFIX} for you when you run make install.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Mon, 13 Jun 2022 18:14:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve been playing with it a little. It looks like dynamic linking works on Linux and possibly Windows but not static linking. I found these instructions on GiHub:</p><div class="source-code snippet"><div class="inner"><pre>$ <a href="http://www.delorie.com/djgpp/doc/libc/libc_570.html" target="_blank">mkdir</a> build
$ cd build
$ cmake .. <span class="k3">-</span>DENET_STATIC<span class="k3">=</span><span class="n">1</span> <span class="k3">-</span>DCMAKE_BUILD_TYPE<span class="k3">=</span>Release
$ cmake <span class="k3">-</span><span class="k3">-</span>build .
</pre></div></div><p> but I haven&#39;t tried it yet. I&#39;ll try it on Linux but not sure if CMake is installed on my Windows laptop. Or how to use it. Will post with results. Thanks.</p><p>Edit: I tried the GiHub commands to build the static library, with a few tweaks. Here are the results:</p><p>[bobkeane@fedora enet-1.3.17]$ make -ENET_STATIC=1 -CMAKE_BUILD_TYPE=Release<br />make: *** MAKE_BUILD_TYPE=Release: No such file or directory.  Stop.<br />[bobkeane@fedora enet-1.3.17]$ make -ENET_STATIC=1 -CMAKE_BUILD_TYPE=Debug<br />make: *** MAKE_BUILD_TYPE=Debug: No such file or directory.  Stop. I&#39;m getting close.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Keane)</author>
		<pubDate>Tue, 14 Jun 2022 03:21:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re mixing cmake and make commands. And your cmake variables are missing -D in front of them.</p><pre>
mkdir build
cd build
cmake-gui ..
make
make install
</pre><p>

Use the CMakeLists.txt I provided. You don&#39;t need to set anything except CMAKE_INSTALL_PREFIX for your install directory.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 14 Jun 2022 18:09:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I Downloaded your file and installed CMake. It works now, thanks Edgar.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob Keane)</author>
		<pubDate>Thu, 16 Jun 2022 04:23:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Awesome. Now learn cmake.<br /><a href="https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/CMake314rc4.chm">https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/CMake314rc4.chm</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 17 Jun 2022 16:39:22 +0000</pubDate>
	</item>
</rss>
