Hi,

I was trying to create a simple DLL wich should return "Hello World", but I failed.

I am using Dev-C++ (4.9.9.2)

Here is what I did:

File -> new -> project -> DLL -> Project1

Adding...


dllmain.cpp

Code:
#include <windows.h>

extern "C" int WINAPI func(HWND,HWND,char *data,char*,BOOL,BOOL)
{
	lstrcpy(data,"Hello World");
	return 3;
}


dllmain.def

Code:
LIBRARY Project1
EXPORTS
func


After compiling, "Makefile.win" is being activated and there is this red marked:


dllmain.o: dllmain.def
$(CPP) -c dllmain.def -o dllmain.o $(CXXFLAGS)


And here the compiler log:

Code:
37 C:\Dev-Cpp\Makefile.win [Warning] overriding commands for target `dllmain.o' 
34 C:\Dev-Cpp\Makefile.win [Warning] ignoring old commands for target `dllmain.o' 
34 C:\Dev-Cpp\Makefile.win [Build Error] multiple definition of `dllinfo@24' 
34 C:\Dev-Cpp\Makefile.win [Build Error] first defined here 
34 C:\Dev-Cpp\Makefile.win [Build Error] ld returned 1 exit status 
 C:\Dev-Cpp\Makefile.win [Build Error]  [Project1.dll] Error 1 


This is my first try at creating a DLL, so can anyone help me out here?