Results 1 to 4 of 4

Thread: linux compile

  1. #1
    Guest

    linux compile

    have i to put a library in addition to these 4 for compiling under linux?
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <GL/glut.h>

    if not how can i compile?
    thanks for your help

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: linux compile

    To compile OpenGL apps under Linux you would do something like so..

    g++ source.cpp -lglut -lGL -lGLU

    Or you would add something like that to a Makefile so that you wouldn't have to do that every time.
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: linux compile

    Just thought I would clarify something... from your post it appears that you are under the impression that the .h files are the libraries. For some reason this seems to be a common misconception. The .h files just give you definitions for functions. The actual implementation of the functions are in the library itself. Many of the common C/C++ libraries are linked in by default, but other libraries are not. (Such as OpenGL, pthreads, etc.)

    Think of the .h file as giving you a window to what is in the actual library.
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    FRANCE
    Posts
    4

    Re: linux compile

    thank you

Similar Threads

  1. How to compile under Linux
    By Rana in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-16-2004, 12:06 PM
  2. Compile Linux to NT
    By svd in forum OpenGL: Windows
    Replies: 1
    Last Post: 02-16-2004, 04:24 AM
  3. how i may compile sdl in linux
    By c_anindya in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-07-2002, 01:15 PM
  4. Will CPW compile on Mac OS X and Linux?
    By AlainODea in forum OpenGL: General
    Replies: 4
    Last Post: 04-02-2002, 12:37 PM
  5. How do you compile on Linux....
    By LaptuaZ in forum OpenGL: Linux
    Replies: 2
    Last Post: 06-17-2001, 09:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean