[SOLVED] Dynamic library

CodeLite installation/troubleshooting forum
Kush
CodeLite Enthusiast
Posts: 11
Joined: Sat Jul 27, 2013 5:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

[SOLVED] Dynamic library

Post by Kush » Sun Jul 28, 2013 8:05 pm

Where can I find some tutorial that can guide me when creating dlls?
I'm not getting in CodeLite!
Last edited by Kush on Tue Jul 30, 2013 3:07 pm, edited 1 time in total.

User avatar
eranif
CodeLite Plugin
Posts: 6132
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by eranif » Sun Jul 28, 2013 8:41 pm

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
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread

Kush
CodeLite Enthusiast
Posts: 11
Joined: Sat Jul 27, 2013 5:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by Kush » Sun Jul 28, 2013 9:17 pm

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

User avatar
eranif
CodeLite Plugin
Posts: 6132
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by eranif » Sun Jul 28, 2013 9:35 pm

There seems to be a bug in the template :P

Simply:

Right click on the project and select 'Settings -> Common Settings -> General'
In the 'Output file' rename 'TestLibrary.so' to 'TestLibrary.dll'

Eran
Make sure you have read the HOW TO POST thread

Kush
CodeLite Enthusiast
Posts: 11
Joined: Sat Jul 27, 2013 5:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by Kush » Sun Jul 28, 2013 10:06 pm

I tried to inject it but no success. Is this normal? The injector is functioning normally (tested)
TestLibrary.rar
You do not have the required permissions to view the files attached to this post.

User avatar
eranif
CodeLite Plugin
Posts: 6132
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by eranif » Mon Jul 29, 2013 10:05 am

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
Make sure you have read the HOW TO POST thread

Kush
CodeLite Enthusiast
Posts: 11
Joined: Sat Jul 27, 2013 5:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by Kush » Mon Jul 29, 2013 12:31 pm

It is a .dll injector, to make hacks.
But I think the error is in my code. hehe

Kush
CodeLite Enthusiast
Posts: 11
Joined: Sat Jul 27, 2013 5:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Dynamic library

Post by Kush » Tue Jul 30, 2013 3:06 pm

SOLVED

Code: Select all

extern "C" __declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)

Post Reply