Google &quot;download glut32.dll&quot; and pull that file down and put it in the directory with your executable.&nbsp; I&#39;d attach it myself, but gmail won&#39;t let me.&nbsp; I use that all the time, though.<br><br><div class="gmail_quote">
2008/4/25 Peter Schmitz &lt;<a href="mailto:ps.haskell@gmail.com">ps.haskell@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">Problem summary</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">Trying to build a stand-alone executable GLUT app with ghc, Windows XP <br>
<br></span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">Problem description</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">I compile and link (without errors) a simple GLUT application under Windows XP. <br>
When I run it, XP pops an error window saying the app cannot start due to a missing &quot;glut32.dll&quot;. <br><span>&nbsp;</span><br>I want to do a static build to create a stand-alone executable GLUT app under Windows XP, <br>

without using DLL files, or placing any files in the Windows system dir. <br>This is my first GUI code in Haskell, and I chose GLUT because it is a standard library. <br><span>&nbsp;</span><br>Following are some details. <br>

Thanks much for any advice. <br><br></span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">Source code</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">-- Simple GLUT app to create a window <br>module Main(main) where <br>
<span>&nbsp;</span><br>import Graphics.Rendering.OpenGL <br>import Graphics.UI.GLUT <br><span>&nbsp;</span><br>main = do<span>&nbsp; </span><br><span>&nbsp;</span><span>&nbsp; </span>(progname, _) &lt;- getArgsAndInitialize <br>
<span>&nbsp;&nbsp; </span>createWindow &quot;Hello World&quot; <br><span>&nbsp;&nbsp; </span>mainLoop <br><br>
</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">Compile/run Environment</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc-6.8.2 on a USB flashdrive under a non-admin Windows XP account</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc dir is not on C:</span></p>
<p style="margin: 0in 0in 0pt 35pt;"><span style="font-size: 10pt; font-family: Arial;">E:\apps\ghc\ghc-6.8.2</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">XP shell used: cmd.exe</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">shell path</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">E:\ghcTest&gt;path</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">PATH=C:\WINDOWS\system32;C:\WINDOWS;E:\apps\ghc\ghc-6.8.2\bin;.\</span></p>

<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">ghc library path</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">E:\ghcTest&gt;ghc --print-libdir</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">E:/apps/ghc/ghc-6.8.2</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10.5pt; font-family: Arial;">compile/link output</span><span style="font-size: 10pt; font-family: Arial;"></span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">E:\ghcTest&gt;ghc --make x<span>&nbsp; </span>-package GLUT</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">[1 of 1] Compiling Main<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>( x.hs, x.o )</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">Linking x.exe ...</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">E:\ghcTest&gt;</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">files (sizes in bytes)</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>186 x.hs <br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>387 x.hi <br>
<span>&nbsp;&nbsp;&nbsp; </span>3,184 x.o <br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>498 x.exe.manifest <br>609,222 x.exe <br><br>
</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">When application is run</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">Error dialog window pops up</span></p>
<p style="margin: 0in 0in 0pt 35pt;"><span style="font-size: 10pt; font-family: Arial;">window title</span></p>
<p style="margin: 0in 0in 0pt 52.5pt;"><span style="font-size: 10pt; font-family: Arial;">a.exe - Unable To Locate Component</span></p>
<p style="margin: 0in 0in 0pt 35pt;"><span style="font-size: 10pt; font-family: Arial;">window text</span></p>
<p style="margin: 0in 0in 0pt 52.5pt;"><span style="font-size: 10pt; font-family: Arial;">The application has failed to start because glut32.dll was not found.<span>&nbsp; </span><br>
Re-installing the application may fix this problem. <br><br></span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">No output in shell; no glut window is created.</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; font-family: Arial;">Other builds tried; same runtime error</span></p>
<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc<span>&nbsp; </span>--make x<span>&nbsp; </span>-package GLUT<span>&nbsp; </span>-static</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc -package GLUT<span>&nbsp; </span>x.hs<span>&nbsp; </span>-o x</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc --make x<span>&nbsp; </span>-package GLUT<span>&nbsp; </span>-LE:\apps\ghc\ghc-6.8.2\lib\GLUT-2.1.1.1</span></p>

<p style="margin: 0in 0in 0pt 17.5pt;"><span style="font-size: 10pt; font-family: Arial;">ghc --make x<span>&nbsp; </span>-LE:\apps\ghc\ghc-6.8.2\lib\GLUT-2.1.1.1</span></p>

<div style="margin: 0in 0in 0pt;"><font face="Times New Roman">&nbsp;</font></div><font color="#888888">
<div style="margin: 0in 0in 0pt;"><font face="Times New Roman">--</font></div>
<div style="margin: 0in 0in 0pt;"><font face="Times New Roman"></font>&nbsp;</div>
</font><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>I try to take things like a crow; war and chaos don&#39;t always ruin a picnic, they just mean you have to be careful what you swallow.<br><br>-- Jessica Edwards