how to configure for DLL version

My goal is to link the three include files internally for the project and have the program reference them there. Its not working out as I predicted; I still have to specify it in the main.cpp. I thought if you included these internally it would work the same as main.cpp. I have obviously have a convoluted understanding of my include files. Is there any way to do this? I want to make non-DLL version.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//#include <GL/gl.h>
//#include <GL/glu.h>
//#include <GL/glut.h>

void setup(){
   glClearColor(1.0f, 0.0f, 0.0f, 0.0f);    // backgrouning
}

void display(){
...
}

int main(int argc, char *argv[]){

    ...code

    return 0;
}

@JHAM1550 - Please do not hijack someone else's thread. You already have your own thread.
I don't quite understand your question, so I'll do my best to just explain the facts.

The way one uses OpenGL is as follows:
1. Every source file that uses OpenGL functions must include either directly (the #include directive appears right in its contents) or indirectly (the file includes another file that includes the wanted header) the required OpenGL header. Even if main.cpp and A.cpp are linked into the same final executable, you cannot omit including the OpenGL headers in main.cpp if main.cpp uses OpenGL functions.
2. Once the program is linked, it will almost invariably contain references to a system DLL that implements the OpenGL calls. Because of the way OpenGL is designed (it integrates tightly with the video hardware) it's not possible/practical to link OpenGL statically. If you somehow managed to do it, you'd find that your program would only run on your computer. The other alternative would be to implement the OpenGL calls in software, which could be done, if you don't care about performance.
Thanks, very thorough.
Topic archived. No new replies allowed.