PDA

View Full Version : .dll using GLUT libraries



titoGonzales
07-15-2005, 08:03 AM
Basically, I need to create an api that can be called from another program. The only way to do this is to use a dll due to the way our application is setup.

As I have some experience using the GLUT libraries, I want to know if it was possible to use GLUT from a dll. I am using MSVC 6 to code the api. Reading the documentation on setting up the GLUT libraries for MSVC, it says that I need to use a Win32 Console Application project. However, in order to create a .dll, I need to use a Win32 Dynamic Link Library project.

I tried using the calls to the GLUT library within the Win32 DLL project. It compiles ok, but when I try to use the function in our application, I get an error message stating the requested library could not be loaded.

Does anyone know if it is possible to use the GLUT libraries with a dll, or do I have to use the standard Windows api libraries? Thanks.

CWiC
07-16-2005, 02:45 AM
I believe it's fairly possible. What error message (exactly) did you got?

dvm
07-16-2005, 04:34 AM
Actually, for what it's worth, you can use glut from a win32 application as well. You just don't get the console window.

titoGonzales
07-16-2005, 02:25 PM
Unfortunately, debugging this is quite difficult because the dll is being called by another program coded in Arden Syntax, a medical logic type language. The error message it generates states "The requested library (name of dll generated) could not be loaded".

That's all I have to go on. The dll runs fine when I comment out the glut portion of the code. But soon as the glut section is included, it no longer works. I'm not exactly sure how a dll works, whether it is limited to the certain types of libraries or not. I know this is somewhat of an awkward setup.

07-17-2005, 09:35 AM
Looks like a basic compiler settings issue. Make sure the compiler can find all the headers, libraries, and dlls it need to build and run everything.

Loading dlls within dlls is very commonplace...