Static linking on Windows



I've inherited gtkmm code used on Linux and am trying to use it on Windows. The current build machinery requires the presence of a large number of .dll files, which I can pass along to end users (who rarely will already have gtk installed), but it would seem cleaner to link static versions of the libraries into the application. I'm a bit new to this aspect of things. I did search the gtkmm archives and saw one similar note but didn't understand how to proceed, so I'm asking my naive question here.

Currently the last step in the build looks like this:

g++ -shared -s -mthreads -o cvisual.pyd arrow.lo axial.lo box.lo cone.lo cylinder.lo display_kernel.lo ellipsoid.lo frame.lo label.lo mouseobject.lo primitive.lo pyramid.lo rectangular.lo renderable.lo ring.lo sphere.lo convex.lo curve.lo cvisualmodule.lo faces.lo num_util.lo scalar_array.lo slice.lo vector_array.lo wrap_arrayobjects.lo wrap_display_kernel.lo wrap_primitive.lo wrap_rgba.lo wrap_vector.lo clipping_plane.lo displaylist.lo errors.lo extent.lo gl_free.lo lighting.lo quadric.lo rgba.lo texture.lo tmatrix.lo vector.lo icososphere.lo numeric_texture.lo points.lo atomic_queue.lo random_device.lo text.lo render_surface.lo display.lo wrap_ustring.lo winrate.lo wintimer.lo -lpython25 -lboost_python25 -lgdi32 -lopengl32 -lglu32 -user32 -Wl,-luuid -Lc:/MinGW/lib -lgtkglextmm-win32-1.2 -lgdkglextmm-win32-1.2 -lgtkglext-win32-1.0 -lgdkglext-win32-1.0 -lglu32 -lopengl32 -luser32 -lkernel32 -lglademm-2.4 -lgtkmm-2.4 -lglade-2.0 -lgdkmm-2.4 -latkmm-1.6 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgtk-win32-2.0 -lxml2 -lgdk-win32-2.0 -lgdi32 -limm32 -lshell32 -lole32 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lfontconfig -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lfreetype -lz -Lc:/MinGW/lib -lgthread-2.0 -lglib-2.0 -lintl -liconv -lboost_thread /bin/install -c cvisual.pyd /c/installers/eclipse-SDK-3.0.1-win32/eclipse/workspace/build/site-packages/cvisual.pyd

What do I need to do to change to static libraries? I'm using MinGW and MSYS, and it looks to me like I've got in the MinGW directories static as well as dynamic libraries. For example, in c:\MinGW\lib I see libgtkglext-win32-1.0.a (static library?) and libgtkglext-win32-1.0.dll.a (static library?), as well as libgtkglext-win32-1.0-0.dll in c:\MinGW\bin.

Bruce Sherwood

P.S. The application is VPython (see vpython.org), which is a cross-platform 3D visualization module for Python. Currently there are some files that are Windows-specific, and for various reasons I'm trying to eliminate them.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]