-
August 26th, 2013, 04:02 PM
#1
[RESOLVED] we can add dll's by code?
we can add dll's by code right(to exe)?
-
August 27th, 2013, 02:55 AM
#2
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.
Victor Nijegorodov
-
August 27th, 2013, 03:45 AM
#3
Re: we can add dll's by code?
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)
Last edited by Cambalinho; August 27th, 2013 at 05:47 AM.
-
August 27th, 2013, 03:54 AM
#4
Re: we can add dll's by code?
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?
Victor Nijegorodov
-
August 27th, 2013, 05:46 AM
#5
Re: we can add dll's by code?
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
-
August 27th, 2013, 06:36 AM
#6
Re: we can add dll's by code?
Victor Nijegorodov
-
August 27th, 2013, 06:50 AM
#7
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.
-
August 27th, 2013, 08:41 AM
#8
Re: we can add dll's by code?
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?
-
August 27th, 2013, 08:45 AM
#9
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|