Distributing binary files

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ecoonradt
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Jan 30, 2007 5:04 pm

Distributing binary files

Post by ecoonradt » Wed Feb 21, 2007 6:58 pm

Hello,

I'm relatively new to wxWidgets, but I've managed to put together a very simple application that simulates the dice game CeeLo. http://bingweb.binghamton.edu/~ecoonra1

It works great when I compile it on each machine that I want to run it on, but in both linux and windows when I manually move the compiled binary file to another machine running the same OS it (usually) does not run.

I'm using wxWidgets 2.8.0 with MS Visual Studio 2005 on Windows, and g++ on linux. I imagine (at least for windows) that VS is including some DLLs that are unique to my system, and therefore the program won't run anywhere else.

I'd like to know how to be able to compile once and run anywhere. Are there possibly compiler or linker options that I can change in VS to make this work? Or is there some way to determine what DLLs a program requires so I can distribute them with the compiled exe?

Thanks

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Wed Feb 21, 2007 7:02 pm

Habve you build wxWidgets as static? For distribtuing a single app, it makes things easier (even though on Linux it's always tricky from distro to distro)

User avatar
tierra
Site Admin
Site Admin
Posts: 1343
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Distributing binary files

Post by tierra » Wed Feb 21, 2007 10:35 pm

ecoonradt wrote:I'm using wxWidgets 2.8.0 with MS Visual Studio 2005 on Windows, and g++ on linux. I imagine (at least for windows) that VS is including some DLLs that are unique to my system, and therefore the program won't run anywhere else.
This is usually the case, and most often happens with whatever version of the C++ Runtime Library you are using, but Visual Studio usually includes a permissive license for redistributing most of the more commonly used libraries.
ecoonradt wrote:I'd like to know how to be able to compile once and run anywhere. Are there possibly compiler or linker options that I can change in VS to make this work? Or is there some way to determine what DLLs a program requires so I can distribute them with the compiled exe?
There isn't really any compiler options that do anything in this regard, it's more of just knowing which libraries you're linking statically, which you're distributing as shared libraries, and knowing/checking version numbers on any libraries you add dependencies for that you don't redistribute (mostly an issue on linux systems where it's near impossible to link to GTK+ statically, and you shouldn't really be distributing your own version either). wxWidgets has checks in place for supporting different versions of GTK+, so that issue shouldn't get in the way much.

Post Reply