Page 1 of 1
					
				[SOLVED] Dynamic library
				Posted: Sun Jul 28, 2013 8:05 pm
				by Kush
				Where can I find some tutorial that can guide me when creating dlls?
I'm not getting in CodeLite!
			 
			
					
				Re: Dynamic library
				Posted: Sun Jul 28, 2013 8:41 pm
				by eranif
				Simply create new project and set its type to 'Dynamic Library'
You should always post your codelite configuration (including which compiler you are using)
2.png
Eran
 
			
					
				Re: Dynamic library
				Posted: Sun Jul 28, 2013 9:17 pm
				by Kush
				If compile correctly will create a .dll, right?
Code: Select all
C:\Windows\system32\cmd.exe /c "mingw32-make.exe -j 4 -e -f  Makefile"
"----------Building project:[ TestLibrary - Debug ]----------"
mingw32-make.exe[1]: Entering directory `C:/Users/pc/Desktop/TestLibrary'
g++  -c  "C:/Users/pc/Desktop/TestLibrary/dll.cpp" -g  -o ./Debug/dll.o -I. -I.
g++ -shared -fPIC -o ./Debug/TestLibrary.so @"TestLibrary.txt" -L/Debug   -s
mingw32-make.exe[1]: Leaving directory `C:/Users/pc/Desktop/TestLibrary'
0 errors, 0 warnings
It has no file .dll
 
			
					
				Re: Dynamic library
				Posted: Sun Jul 28, 2013 9:35 pm
				by eranif
				There seems to be a bug in the template 
 
Simply:
Right click on the project and select 'Settings -> Common Settings -> General'
In the 'Output file' rename 'TestLibrary.so' to 'TestLibrary.dll'
Eran
 
			
					
				Re: Dynamic library
				Posted: Sun Jul 28, 2013 10:06 pm
				by Kush
				I tried to inject it but no success. Is this normal? The injector is functioning normally (tested)
TestLibrary.rar
 
			
					
				Re: Dynamic library
				Posted: Mon Jul 29, 2013 10:05 am
				by eranif
				Kush wrote:I tried to inject it but no success. Is this normal? The injector is functioning normally (tested)
TestLibrary.rar
 
I am not sure what you mean here... what is the "injector" that you are talking about?
Eran
 
			
					
				Re: Dynamic library
				Posted: Mon Jul 29, 2013 12:31 pm
				by Kush
				It is a .dll injector, to make hacks.
But I think the error is in my code. hehe
			 
			
					
				Re: Dynamic library
				Posted: Tue Jul 30, 2013 3:06 pm
				by Kush
				SOLVED
Code: Select all
extern "C" __declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)