Thread: Complied execute file cannot work on other computer

  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    China
    Posts
    11

    Complied execute file cannot work on other computer

    I am working on OpenGL programming by Code::Blocks at Vista. The complied executive file worked fine in my computer, but it didn't work with error of GLUT32.dll not found. Would there be any way or setting in Code::Blocks to fix it, so that any machine can work? My settng at Code::Blocks is listed below :
    ================================================== =====
    Compiler : GNU GCC Compiler
    C compiler : mingw32-gcc.exe
    C++ compiler : mingw32-g++.exe
    Linker for dynamic libs : mingw32-g++.exe
    Linker for static libs : ar.exe
    Debugger : gdb.exe
    Resource compiler : windres.exe
    Make program : make.exe

    Project build options
    Compiler settings: Enable all compiler warnings
    Linker settings : mingw32, SDLmain, SDL.dll, user 32, gdi32, winmm, dxguid

    And a list of dlls added under differenct directory as below :

    /Windows/ : opengl32.dll, glu32.dll, glmf32.dll, glut32.dll
    /Windows/system/ : glut32.dll
    /Windows/system32/ : opengl32.dll, glu32.dll

    ================================================== ==
    Tks.

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    glut32.dll is a dll that comes with any OpenGL, CUDA, OpenCL, etc type API/SDK. The best, and probably only platform independent, solution is to include glut32.dll with the executable file.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    China
    Posts
    11
    Do you mean that the only way to put glut32.dll into windows system of target computer? Need more input. Tks.

  4. #4
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    or better yet into your application installation directory where it belongs.

    You can NOT assume it exists anywhere else if you don't include it with your program.

  5. #5
    Registered User
    Join Date
    Apr 2010
    Location
    China
    Posts
    11
    Sorry, I don't know how to do as you said "~ yet into your application installation directory where it belongs.". Could you tell me how to make it?
    Tks.

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by jcheng3305 View Post
    Sorry, I don't know how to do as you said
    How do you copy your exe file?
    copy all needed dll-s to the same folder
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can anyone help?
    By javalurnin in forum C Programming
    Replies: 11
    Last Post: 12-02-2009, 06:02 AM
  2. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  3. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  4. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  5. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM