Stuck when linking

This is a discussion on Stuck when linking within the C Programming forums, part of the General Programming Boards category; Hello again, now I'm beginning to learn OpenGL because I'm stuck with any 3D graphics engines out there, they doesn't ...

  1. #1
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489

    Stuck when linking

    Hello again, now I'm beginning to learn OpenGL because I'm stuck with any 3D graphics engines out there, they doesn't provide the right stuff for completely beginners things and many of them are C++ not C. (I'm still in love with non-object-oriented programming, it's simple to understand)

    By the way, whenever I wan't to install libraries from the net (for example OpenGLUT), i've got something terrible when linking my application..

    Code:
    undefined reference to `_imp__glutInitDisplayMode@4'
    undefined reference to `_imp__glutInitWindowSize@8'
    undefined reference to `_imp__glutInitWindowPosition@8'
    undefined reference to `_imp__glutMainLoop@0'
    First, I already copied the *.h file to the 'compiler-root-folder\include' path and the *.lib file to 'compiler-root-folder\lib'.

    Second, I've tried using -L -l switches.

    But they doesn't work even on GCC, MinGW, Dev-C++ <-- (they are all the same), TCC and BCC32, but they works well on MSVC.

    Any suggestion, please?
    Last edited by audinue; 06-30-2008 at 02:04 PM.

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Are you referencing the .lib files when you link?

  3. #3
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Oh God, thanks...

    I've tried:
    gcc -l "OpenGlut.lib" --> doesn't work
    gcc -l "lib\OpenGlut.lib" --> doesn't work
    gcc -l "lib\OpenGlut" --> doesn't work

    ...and the last...
    gcc -l "OpenGlut" --> works

    ^_^ thanks MacGyver!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visual C++ 6.0 : linking / compiling problems
    By sh4k3 in forum Tech Board
    Replies: 2
    Last Post: 06-16-2007, 12:20 AM
  2. Replies: 6
    Last Post: 10-23-2006, 07:22 PM
  3. Problems linking with g++
    By Just in forum Linux Programming
    Replies: 11
    Last Post: 07-24-2006, 01:35 AM
  4. Linking error with DirectDrawCreateEx
    By jjj93421 in forum Game Programming
    Replies: 6
    Last Post: 04-06-2004, 03:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21