Hi timovjl,
I don't know if you're telling me something, or asking me a question?
Let me try my question again... Let's say I have 2 files: testdll.c and test.c
Let's start with testdll.c:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
int ReturnNumber (void)
{
return 98765;
}
int ReturnAnotherNumber(void)
{
return 12345;
}
With GCC, I type this, and I get only a dll file: testdll.dll. I don't get a .def file. Just testdll.dll.
gcc -shared -o testdll.dll testdll.c
At this point, pretend I don't have testdll.c anymore. It's completely gone. I can't make the .lib file. All I have is testdll.dll, and I know there are 2 functions in it.
To use testdll.dll, I write this in test.c:
#include <stdio.h>
int main (int argc, char **argv)
{
printf("Test: %d\n", ReturnNumber()); //notice I can use the function simply by calling it, no need to loadlibrary or getprocaddress
printf("Test: %d", ReturnAnotherNumber()); //same thing here
return 0;
}
To compile the code, I type:
gcc -L. -ltestdll -o test test.c
And everything works.
My question is, can I do this in Pelles C?
Thanks.