Need help with DLL!

I'm trying to make a basic DLL that holds OpenGL then port it to Java so I don't have to deal with the stupid JOGL junk. Anyway here is my code so far:

main.cpp
1
2
3
4
5
6
7
8
9
10
#include "main.h"

#include<iostream>

using namespace std;

void print(string i)
{
    cout << i << endl;
}


main.h
1
2
3
4
5
#include<iostream>

using namespace std;

void print(string i);


I have a feeling I'm doing this wrong but I don't know. Anyway if you can help me that would be great! Also does anyway know how I can take all the OpenGL functions and and put it into a DLL? Like the code to do that (it shouldn't be that hard, I just don't know how to do it lol) because if you can do that I would really like it. Thanks!
Topic archived. No new replies allowed.