So I'm attempting to fix a OpenGL in Java problem by making a DLL in C++ and then call it from Java but I've ran into an issue. So I'm testing a basic DLL in C++ and I got this error: "error: 'hGetProcDLL' was not declared in this scope|" This is my code:
#include<windows.h>
#include<stdlib.h>
#include<cstdlib>
#include <iostream>
using namespace std;
typedef void (*f_print)(string);
int main()
{
//The DLL Is Called OpenGL But I'm Making A Basic Print Function In It To Test It
HINSTANCE DLLI = LoadLibrary("C:\\OpenGL.dll");
if (DLLI == NULL)
{
cout << "Error loading DLL" << endl;
return 1;
}
f_print print = (f_print)GetProcAddress(hGetProcIDDLL, "print");
if (!print)
{
cout << "Invalid function!" << endl;
return 1;
}
print("FUNCTION!!!!!!!!!");;
return 0;
}
Any idea what's happening?