<div dir="ltr"><div class="gmail_quote">I'm working with a GUI library and I can get everything to work when I run my executable. When I try to call my gui function within ghci, it crashes with: user error (unknown GLU entry gluOrtho2D). I'm on Arch running ghc version 7.10.3.<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><span class=""><div><br></div></span><div>The GLURaw maintainer could reproduce this and added some insight</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:21px;margin-top:0px!important">I can reproduce this both with LTS Haskell (based on GHC 7.10.3) and Stackage nightly (based on GHC 8.0.1) on Ubuntu 16.04, too. This is somehow related to GHCi's dynamic linker, which has changed a few times in the past, and there are still issues with it. Alas, I don't remember the details, but perhaps you can get some answers on the <code style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">haskell-cafe</code> mailing list. All I can say is that things worked even within GHCi at some point in the past... <img title=":wink:" alt=":wink:" height="20" width="20" src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f609.png" style="border-style:none;max-width:none;vertical-align:text-top;background-color:transparent"></p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;line-height:21px">The gory details: Given an API entry name like <code style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">"gluOrtho2D"</code>, the GLURaw package uses <code style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">dlopen</code> and<code style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">dlsym</code> to get the address of the function, see the <a href="https://github.com/haskell-opengl/GLURaw/blob/2fbff384e9637e1c1763c65a5f843b8fc36b1fea/src/Graphics/GLU/Functions.hs#L91" style="color:rgb(64,120,192);text-decoration:none;background-color:transparent" target="_blank">Haskell part</a> and the <a href="https://github.com/haskell-opengl/GLURaw/blob/2fbff384e9637e1c1763c65a5f843b8fc36b1fea/cbits/HsGLURaw.c#L77" style="color:rgb(64,120,192);text-decoration:none;background-color:transparent" target="_blank">C part</a>. For some reason, <code style="font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">dlsym</code>doesn't find the GLU entries when running under GHCi, while the compiled version does.</p></blockquote></span></div>
</div>Any help is appreciated</div>
</div><br></div>