Menu

Cannot find -luser32

biterman
2004-09-06
2012-09-26
  • biterman

    biterman - 2004-09-06

    Hi,

    I uninstalled Dev-Cpp 4.9.8.10, which was working dandy except for the debugger, and installed the full package of Dev-Cpp 4.9.9.0. I did both things following the instructions in Aditsu's FAQ.

    But now I can't compile anything. I get a "Cannot find -luser32" error message. I'm certain there's no hidden gcc or whatnot in my HDD messing things up because I went thru something similar last time I updated, the thread on that experience must be lying around here somewhere. Nevertheless, I've searched the HDD and the registry for anything suspicious, haven't found anything. So, basically I'm stumped.

    Thanks for all your help,
    biterman.

    /* Begin Compile Log */
    Compiler: Default compiler
    Building Makefile: "C:\Dario\INTEC\Lenguajes\Lab\t03\Makefile.win"
    Executing  make...
    make.exe -f "C:\Dario\INTEC\Lenguajes\Lab\t03\Makefile.win" all
    gcc.exe -D__DEBUG__ main.o  -o "t03.exe" -L"C:/DEV-CPP/lib"  -g3

    C:\DEV-CPP\BIN\..\lib\gcc-lib\mingw32\3.3.1\..\..\..\..\mingw32\bin\ld.exe: cannot find -luser32

    Execution terminated
    /* End Compile Log */

     
    • aditsu

      aditsu - 2004-09-06

      do you have libuser32.a in C:\Dev-Cpp\lib ?

      Adrian

       
      • Nobody/Anonymous

        I'm having the exact same problem. I'm also using 4.9.9.0.

         
    • biterman

      biterman - 2004-09-06

      Curious,

      I repeated the process, clean uninstall-reinstall, and now things are working again...

      Maybe I changed something without noticing... oh well...

      Thanks for your help,
      biterman.

       
    • Nobody/Anonymous

      luser32 is easy to find:
      Search for kip on ICQ, that's his nickname there...

       
      • Kip

        Kip - 2004-09-22

        You are a coward.

        Kip

         
    • aditsu

      aditsu - 2004-09-22

      > I'm having the exact same problem. I'm also using 4.9.9.0.

      then did you try the exact same solution?

      > luser32 is easy to find

      although Kip may or may not be a loser, the only person that your message insults is yourself
      seriously, grow up

      Adrian

       
      • Nobody/Anonymous

        I did the solution, but to no avail. I uninstalled and re-installed fresh. I installed the libraries I needed (GLUT), but this occurs even if I use GL libraries already there. I have included the appropriate switches to my linker command line. No matter what, I get linker errrors.

        I'm using WinXp and version 4.9.9.0.

        Here's my compile log:

        Compiler: Default compiler
        Executing gcc.exe...
        gcc.exe "C:\CSE270\cpp\hello.c" -o "C:\CSE270\cpp\hello.exe" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -lopengl32 -lglut32 -lglu32
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0xe):hello.c: undefined reference to _imp__glClear' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x2f):hello.c: undefined reference to_imp__glColor3f'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x3d):hello.c: undefined reference to _imp__glBegin' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x5e):hello.c: undefined reference to_imp__glVertex3f'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x7f):hello.c: undefined reference to _imp__glVertex3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0xa0):hello.c: undefined reference to_imp__glVertex3f'

        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0xc1):hello.c: undefined reference to _imp__glVertex3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0xc8):hello.c: undefined reference to_imp__glEnd'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0xcf):hello.c: undefined reference to _imp__glFlush' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x10a):hello.c: undefined reference to_imp__glClearColor'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x118):hello.c: undefined reference to _imp__glMatrixMode' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x11f):hello.c: undefined reference to_imp__glLoadIdentity'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x14d):hello.c: undefined reference to _imp__glOrtho' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1ac):hello.c: undefined reference toglutInit'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1b8):hello.c: undefined reference to glutInitDisplayMode' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1cc):hello.c: undefined reference toglutInitWindowSize'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1e0):hello.c: undefined reference to glutInitWindowPosition' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1ec):hello.c: undefined reference toglutCreateWindow'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x1fd):hello.c: undefined reference to glutDisplayFunc' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x209):hello.c: undefined reference toglutKeyboardFunc'
        C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccyQbaaa.o(.text+0x20e):hello.c: undefined reference to `glutMainLoop'

        Execution terminated

         
        • aditsu

          aditsu - 2004-09-23

          well, that's a TOTALLY DIFFERENT problem!
          did you check the forum FAQ? it has a section dedicated to opengl and glut

          Adrian

           
    • Nobody/Anonymous

      Of course I did! ;-)

      ll right... after attempting the GEM program.. IT WORKED! That's frustrating... but my program still shows up as riddled with linker errors.

      WinXP / Dev-C++ 4.9.9.0

      Here's the program:

      include <GL/glut.h>

      include <stdlib.h>

      include <windows.h>

      include <stdio.h>

      include <math.h>

      void Initialize();
      void MouseHandler(int button, int state, int x, int y);
      void KeyboardHandler(unsigned char key, int x, int y);
      void MainMenuHandler(int option);
      void Animate();
      void Reshape(int width, int height);
      void Display();

      /************
      main()

      Setup GLUT and OpenGL, drop into the event loop
      ***********/
      int main(int argc, char **argv)
      {
      // Setup the basic GLUT stuff
      glutInit(&argc, argv);
      glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

      // Create the window
      glutInitWindowSize(1024, 768);
      glutInitWindowPosition(100, 150);
      glutCreateWindow("BOGLGP Chapter 1");

      Initialize();

      // Register the event callback functions
      glutDisplayFunc(Display);
      glutReshapeFunc(Reshape);
      glutMouseFunc(MouseHandler);
      glutKeyboardFunc(KeyboardHandler);
      glutIdleFunc(Animate);

      // At this point, control is relinquished to the GLUT event handler.
      // Control is returned as events occur, via the callback functions.
      glutMainLoop();

      return 0;
      } // end main()

      /************
      Initialize()

      One time setup, including creating menus, creating a light, setting the
      shading mode and clear color, and loading textures.
      ***********/
      void Initialize()
      {
      // set up the only meny
      int mainMenu;

      mainMenu = glutCreateMenu(MainMenuHandler);

      glutSetMenu(mainMenu);
      glutAddMenuEntry("Exit", 0);
      glutAttachMenu(GLUT_RIGHT_BUTTON);

      glEnable(GL_DEPTH_TEST);
      } // end Initialize()

      /************
      MouseHandler()

      Handle mouse events. For this simple demo, just exit on a left click.
      ***********/
      void MouseHandler(int button, int state, int x, int y)
      {
      switch (button)
      {
      case GLUT_LEFT_BUTTON:
      {
      exit(0);
      } break;
      default:
      break;
      }

      // force a screen redraw
      glutPostRedisplay();
      } // end MouseHandler()

      /************
      KeyboardHandler()

      Keyboard handler. Again, we'll just exit when q is pressed.
      ***********/
      void KeyboardHandler(unsigned char key, int x, int y)
      {
      switch (key)
      {
      case 'q': // exit
      {
      exit(0);
      } break;
      default:
      {
      } break;
      }
      glutPostRedisplay();
      } // end KeyboardHandler()

      /************
      MainMenuHandler()

      Main menu callback.
      ***********/
      void MainMenuHandler(int option)
      {
      switch(option)
      {
      case 0:
      {
      exit(0);
      } break;
      default:
      break;
      }
      glutPostRedisplay();
      } // end MainMenuHandler()

      /************
      Animate()

      Rotate the cube by 4 degrees and force a redisplay.
      ***********/
      void Animate()
      {
      glutPostRedisplay();
      } // end Animate()

      /************
      Reshape()

      Reset the viewport for window changes
      ***********/
      void Reshape(int width, int height)
      {
      if (height == 0)
      return;

      glViewport(0, 0, (GLsizei) width, (GLsizei) height);
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      gluPerspective(90.0, width/height, 1.0, 100.0);

      glMatrixMode(GL_MODELVIEW);
      } // end Reshape

      /************
      Display()

      Clear and redraw the scene.
      ***********/
      void Display()
      {
      // set up the camera
      glLoadIdentity();
      gluLookAt(0.0, 1.0, 6.0,
      0.0, 0.0, 0.0,
      0.0, 1.0, 0.0);

      // clear the screen
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

      // draw a triangle
      glBegin(GL_TRIANGLES);
      glColor3f(1.0, 0.0, 0.0);
      glVertex3f(2.0, 2.5, -1.0);
      glColor3f(0.0, 1.0, 0.0);
      glVertex3f(-3.5, -2.5, -1.0);
      glColor3f(0.0, 0.0, 1.0);
      glVertex3f(2.0, -4.0, 0.0);
      glEnd();

      // draw a polygon
      glBegin(GL_POLYGON);
      glColor3f(1.0, 1.0, 1.0);
      glVertex3f(-1.0, 2.0, 0.0);
      glColor3f(1.0, 1.0, 0.0);
      glVertex3f(-3.0, -0.5, 0.0);
      glColor3f(0.0, 1.0, 1.0);
      glVertex3f(-1.5, -3.0, 0.0);
      glColor3f(0.0, 0.0, 0.0);
      glVertex3f(1.0, -2.0, 0.0);
      glColor3f(1.0, 0.0, 1.0);
      glVertex3f(1.0, 1.0, 0.0);
      glEnd();

      // draw everything and swap the display buffer
      glutSwapBuffers();
      } // end Display()

      Here's the compile log:

      Compiler: Default compiler
      Executing g++.exe...
      g++.exe "C:\CSE270\cpp\Simple.cpp" -o "C:\CSE270\cpp\Simple.exe" -I"C:\Dev-Cpp\include\c++\3.3.1" -I"C:\Dev-Cpp\include\c++\3.3.1\mingw32" -I"C:\Dev-Cpp\include\c++\3.3.1\backward" -I"C:\Dev-Cpp\lib\gcc-lib\mingw32\3.3.1\include" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -lopengl32 -lglut32 -lglu32
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x3e):Simple.cpp: undefined reference to glutInit' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x4a):Simple.cpp: undefined reference toglutInitDisplayMode'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x5e):Simple.cpp: undefined reference to glutInitWindowSize' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x72):Simple.cpp: undefined reference toglutInitWindowPosition'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x7e):Simple.cpp: undefined reference to glutCreateWindow' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x8f):Simple.cpp: undefined reference toglutDisplayFunc'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x9b):Simple.cpp: undefined reference to glutReshapeFunc' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xa7):Simple.cpp: undefined reference toglutMouseFunc'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xb3):Simple.cpp: undefined reference to glutKeyboardFunc' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xbf):Simple.cpp: undefined reference toglutIdleFunc'

      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xc4):Simple.cpp: undefined reference to glutMainLoop' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xe2):Simple.cpp: undefined reference toglutCreateMenu'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0xf0):Simple.cpp: undefined reference to glutSetMenu' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x104):Simple.cpp: undefined reference toglutAddMenuEntry'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x110):Simple.cpp: undefined reference to `glutAttachMenu'

      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x11c):Simple.cpp: undefined reference to _imp__glEnable' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x140):Simple.cpp: undefined reference toglutPostRedisplay'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x16a):Simple.cpp: undefined reference to `glutPostRedisplay'

      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x18c):Simple.cpp: undefined reference to glutPostRedisplay' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x199):Simple.cpp: undefined reference toglutPostRedisplay'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x1df):Simple.cpp: undefined reference to _imp__glViewport' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x1ed):Simple.cpp: undefined reference to_imp__glMatrixMode'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x1f4):Simple.cpp: undefined reference to _imp__glLoadIdentity' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x22f):Simple.cpp: undefined reference to_imp__gluPerspective'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x23d):Simple.cpp: undefined reference to _imp__glMatrixMode' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x257):Simple.cpp: undefined reference to_imp__glLoadIdentity'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x297):Simple.cpp: undefined reference to _imp__gluLookAt' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x2a5):Simple.cpp: undefined reference to_imp__glClear'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x2b3):Simple.cpp: undefined reference to _imp__glBegin' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x2d4):Simple.cpp: undefined reference to_imp__glColor3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x2f5):Simple.cpp: undefined reference to _imp__glVertex3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x316):Simple.cpp: undefined reference to_imp__glColor3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x337):Simple.cpp: undefined reference to _imp__glVertex3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x358):Simple.cpp: undefined reference to_imp__glColor3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x379):Simple.cpp: undefined reference to _imp__glVertex3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x380):Simple.cpp: undefined reference to_imp__glEnd'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x38e):Simple.cpp: undefined reference to `_imp__glBegin'

      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x3af):Simple.cpp: undefined reference to _imp__glColor3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x3d0):Simple.cpp: undefined reference to_imp__glVertex3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x3f1):Simple.cpp: undefined reference to _imp__glColor3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x412):Simple.cpp: undefined reference to_imp__glVertex3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x433):Simple.cpp: undefined reference to _imp__glColor3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x454):Simple.cpp: undefined reference to_imp__glVertex3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x475):Simple.cpp: undefined reference to _imp__glColor3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x496):Simple.cpp: undefined reference to_imp__glVertex3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x4b7):Simple.cpp: undefined reference to _imp__glColor3f' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x4d8):Simple.cpp: undefined reference to_imp__glVertex3f'
      C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x4df):Simple.cpp: undefined reference to _imp__glEnd' C:\DOCUME~1\WarAxe\LOCALS~1\Temp/ccwrbaaa.o(.text+0x4e6):Simple.cpp: undefined reference toglutSwapBuffers'

      Execution terminated

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.