[RESOLVED] we can add dll's by code?
we can add dll's by code right(to exe)?
Re: we can add dll's by code?
What do you mean by "add dll's"?
And in which platform?
For example, (if what you meant was "execute some function from dll") in Windows you could use LoadLibrary and GetProcAddress APIs.
Re: we can add dll's by code?
Quote:
Originally Posted by
VictorN
What do you mean by "add dll's"?
And in which platform?
For example, (if what you meant was "execute some function from dll") in Windows you could use LoadLibrary and GetProcAddress APIs.
what is mean is: the GCC compiler create exe's that are dependent of 2 DLL's(all exe's created with GCC). can i add these 2 DLL's to exe?´
libgcc_s_sjlj-1.dll and libstdc++-6.dll
(i know that because i have tested)
Re: we can add dll's by code?
Quote:
Originally Posted by
Cambalinho
can i add these 2 DLL's to exe?´
libgcc_s_sjlj-1.dll and libstdc++-6.dll
Again: what do you meran by "add DLL's to exe"?
Id your question about a redistribution of your application on other PCs? Or what else?
Re: we can add dll's by code?
Quote:
Originally Posted by
VictorN
Again: what do you meran by "add DLL's to exe"?
Id your question about a redistribution of your application on other PCs? Or what else?
yes... for a redistribution of my application on other PCs. for don't be dependent from that 2 DLL's
Re: we can add dll's by code?
Re: we can add dll's by code?
a DLL is a Dynamic Link Library.
so as the name implies, it does somewhat the same as a .lib (collection of object files) would do, but instead of linking it into the exe itself, they're provided side by side with the exe, and the exe loads the .dll from disk either when it starts or somewhere during it's runtime if and when it is needed.
so no, you don't "link" a DLL into your exe, you provide the files alongside your exe.
if you wanted to get a single .exe file then you shouldn't build DLL's, but make .lib's instead and link those into your exe.
Re: we can add dll's by code?
Quote:
Originally Posted by
OReubens
a DLL is a Dynamic Link Library.
so as the name implies, it does somewhat the same as a .lib (collection of object files) would do, but instead of linking it into the exe itself, they're provided side by side with the exe, and the exe loads the .dll from disk either when it starts or somewhere during it's runtime if and when it is needed.
so no, you don't "link" a DLL into your exe, you provide the files alongside your exe.
if you wanted to get a single .exe file then you shouldn't build DLL's, but make .lib's instead and link those into your exe.
understand, but these DLL's are from GCC. so he tell me for use -static.
i'm trying, but the compiler don't compile:(
see these lines. they aren't C++(but VB), but you can understand:
strCompilerName = App_Path & "\MinGW32\bin\g++.exe"
strEXEFileName = """" & App_Path & "\test" & """"
strCPPFonteName = """" & App_Path & "\test.cpp" & """"
- the App_Path is the program folder.
and heres how i use it:
strCompilerName & " -o " & strEXEFileName & " " & strCPPFonteName & " -static"
so what i'm doing wrong?
Re: we can add dll's by code?
YES!!!
i found my error hehehehe
i put, in that lines, the "& """"", but i didn't used in my code lol
thanks for all