I am currently making a 2D opengl engine in C++. Im using wxDevC++ and I have made my project to be a static library. What I want is the user to only need to link my library and headers and start coding. The problem that when I do that the compiler complains I'm missing dependencies even though I included them in the static library project.
These are my Linker properties. I compile the library with that and no problem. But when I make a new project ( Windows Application ) and link my library to it it says undefined reference to the opengl functions even though I linked everything in my library.
Examine each library in turn and double check that they do contain the functions that the linker is unable to find. There are various Win tools that can do this.
I just double checked everything and made a simple test. My library only creates a window and uses only one opengl function. I made a dummy project include my library and put in the following code:
1 2 3 4 5 6 7
#include "CWolfCore.h"//my library header
int main()
{
cw_create_window("My first window", 640, 480, 32, false);
while(1){}
}
cw_create_window is a function defined inside the library. When I try to compile I get undefined reference error to the opengl function. I add the following to the linker and it compiles no problem :
-lglut32
-lglu32
-lopengl32
The problem is I already have linked those to the library.