Distribution Topic is solved
Distribution
Is there anything you need to do to distribute your program? Any DLLs to include? Any special way to build it?
-
- Super wx Problem Solver
- Posts: 497
- Joined: Mon Nov 06, 2006 9:58 pm
The fastest way to find out whether or not wxWidgets will require you to add anything else to your distribution is to run the program in a different directory. If it gives you a message box saying that you need some sort of dll, then you will need to include that file with your program.
FlyingIsFun1217
FlyingIsFun1217
Not if the DLLs are installed into system dirsFlyingIsFun1217 wrote:The fastest way to find out whether or not wxWidgets will require you to add anything else to your distribution is to run the program in a different directory. If it gives you a message box saying that you need some sort of dll, then you will need to include that file with your program.
FlyingIsFun1217
Right. I sent a program to my friend, and he got an error. It was complaining about the application configuration. I now know that I need to include a DLL, but what is it?Auria wrote:Not if the DLLs are installed into system dirsFlyingIsFun1217 wrote:The fastest way to find out whether or not wxWidgets will require you to add anything else to your distribution is to run the program in a different directory. If it gives you a message box saying that you need some sort of dll, then you will need to include that file with your program.
FlyingIsFun1217
-
- Super wx Problem Solver
- Posts: 497
- Joined: Mon Nov 06, 2006 9:58 pm
Usually if you can run it fine on your system, but just get an error on another system, the message will tell you what .dll file you need. From there, I'm pretty sure that you can just search for it on the computer you created it on, and copy and paste into your executable's directory.
Auria, wouldn't changing its directory as I said still give you the error message despite the dll being in the system directories?
FlyingIsFun1217
Auria, wouldn't changing its directory as I said still give you the error message despite the dll being in the system directories?
FlyingIsFun1217
If an app called /foo/bar needs lib /usr/lib/wx-gtk.so, /foo2/bar would still find a lib at /usr/lib/wx-gtk.so.FlyingIsFun1217 wrote: Auria, wouldn't changing its directory as I said still give you the error message despite the dll being in the system directories?
@demize:
if you're distributing a single app, you should definitely at least take a look at static linking - it's much easier to distribute.
Otherwise, as flyingisfun said, the error message should usually tell what lib to include.
-
- Super wx Problem Solver
- Posts: 497
- Joined: Mon Nov 06, 2006 9:58 pm
Gotcha, it has a static link to the dll, didn't know that, thought it just called a dll from the local directory.
Good thing I know that now
@Topic-Poster:
Static Linking is a great idea if you want to keep the files included at a minimum, but be aware, the size that it is statically linked might be larger than if you included the program and the dll. Depends on whether or not you have a large program.
FlyingIsFun1217
Good thing I know that now
@Topic-Poster:
Static Linking is a great idea if you want to keep the files included at a minimum, but be aware, the size that it is statically linked might be larger than if you included the program and the dll. Depends on whether or not you have a large program.
FlyingIsFun1217
when configuring, pass the disable-shared switchdemize wrote:How do I use static linking?
../configure --disable-shared
well that's how i did it on wxMac and wxGTK - if you're on windows and you did not use configure maybe refer to the wikis.
@flyingisfun:
Actually i don't think static linking is so much bigger. Actually when i link static, only useful bits of the libs are included (with the help of 'strip') whereas when i link dynamic the whole lib is included. Though the real advantage of static linking is of course that you don't need to care for distribution
http://www.wxwidgets.org/wiki/index.php ... _Tutorials
From there i can help very little - i have no idea how to build static from your IDE and compiler, i only did it from the terminal and g++
From there i can help very little - i have no idea how to build static from your IDE and compiler, i only did it from the terminal and g++
-
- Super wx Problem Solver
- Posts: 497
- Joined: Mon Nov 06, 2006 9:58 pm
No offense to the original poster, but that was somewhat what I was expecting, so doing things like stripping unnecessary components was something that I figured wouldn't happen (hence me saying that the dll and program would probably be smaller )demize wrote:I am on windows, and I don't know what you mean by 'configure'.Auria wrote: well that's how i did it on wxMac and wxGTK - if you're on windows and you did not use configure