#205 v1.95.5 Win32 static lib symbol problem

closed-fixed
6
2003-10-17
2002-09-15
Anonymous
No

I just switched over to using the Win32 static lib
version of Expat in my MSVC++ application.

Now, it appears that the following line:

#define _STATIC

is required before

#include "expat.h"

otherwise, the link fails.

Discussion

  • Karl Waclawek

    Karl Waclawek - 2002-09-15

    Logged In: YES
    user_id=290026

    Either that, or you define _STATIC in the Project Settings.
    Have a look at the "elements" demo project, it is
    statically linked.

    However, I think it is not enough to just have the demo
    project, we should document this as well.

    I'll assign this to Fred, since the documentation
    needs to include static linking instructions for
    Unix systems too.

     
  • Karl Waclawek

    Karl Waclawek - 2002-09-15
    • assigned_to: nobody --> fdrake
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Static linking on Unix is a non-starter -- every platform
    handles all linking differently, and developers hate their
    lives if they have to go beyond writing code to actually
    linking an application together. There's nothing
    Expat-specific in this sea of misery.

    I don't know what a Windows programmer needs to be told, so
    someone will have to tell me, or provide a patch. It sounds
    like there's a problem there, but I've no idea offhand if
    that's unique to the static Expat libraries, or endemic to
    Windows.

     
  • Karl Waclawek

    Karl Waclawek - 2003-01-23

    Logged In: YES
    user_id=290026

    The static linking for Windows is documented in
    the ReadMe file under the Win32 directory.

    But is that enough, or should some documentation
    be added elsewhere - at least the fact that the
    global macro XML_STATIC needs to be defined?

     
  • Mike Roskanuk

    Mike Roskanuk - 2003-01-28

    Logged In: YES
    user_id=698797

    Sorry - where is that Readme? I can't find it (in
    expat_win32bin_1_95_6.exe). Anyway - IMHO it should be
    mentioned in Doc/reference.html [Building and Installing].

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Looks like that file doesn't get installed by the Windows
    installer; it only exists in the CVS repository. I'll add the
    information to the general documentation, or add a separate
    HTML file as part of the docs with a link from the main
    reference.html.

     
  • Fred L. Drake, Jr.

    • labels: --> Documentation
    • priority: 5 --> 6
     
  • Mike Roskanuk

    Mike Roskanuk - 2003-01-28

    Logged In: YES
    user_id=698797

    Fine. BTW why you decided to use Windows installer, when
    it's "just a few files" a you don't need to do anything with
    system as .dll dependencies, registry modifications etc?
    IMHO .zip archive should be sufficient ...

    P.S. FYI: I compiled and use expat on Windows CE 3.0
    with no problem. Thanks 4 good job!

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Added win32/README.txt to the Windows installation in
    win32/expat.iss 1.16. I still intend to me the other
    documentation changes described in earlier comments.

    Glad to hear things work on CE now!

    I went with the installer mostly because I figured that's
    how things seem to be done on Windows, but I'm not really a
    "Windows person" myself. There is an aspect of Expat that
    non-programmers might install it for, and that's the "xmlwf"
    application, but I probably don't do the right thing to make
    that useful out of the box now.

    For me, the real question is "What would Expat users on
    Windows expect?" I'll provide whichever makes the most
    sense; I can provide both if that's the right thing. (This
    might make sense since xmlwf is targetted to a larger
    audience than just developers.)

     
  • Mike Roskanuk

    Mike Roskanuk - 2003-01-28

    Logged In: YES
    user_id=698797

    Generally, winstaller is used by similiar way as rpm and
    other pkg systems, it shoud take care of dependencies
    (correct versions of .dlls), deploy in files, write to windows
    registry etc. For sources only is IMHO better to use .zip,
    same as it's .gzipped for unix/linux world.
    Of course - why not to offer both. Or you can offer zip/rar
    self-extract archive. It could be "golden middle path" (jeez i
    hope this idiom exist in english, too ;-)

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    The current installer includes both libraries and the xmlwf
    application, but just drops them into place. It also
    contains sources.

    Perhaps the right thing for someone who only wants sources
    is to grab the .tar.gz package? Most of the good archive
    handlers used for ZIP files also handle .tar.gz quite well
    (I use WinZip for these on Windows, myself).

     
  • Mike Roskanuk

    Mike Roskanuk - 2003-01-28

    Logged In: YES
    user_id=698797

    That's true, i have no problem with .tar.gz. I just ment
    Win32 version differs ... (usually it's true for code ported to
    win32). Don't worry about it, it was just an idea.

     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    Expat 1.95.7 contains documentation on what's needed to use
    the static libraries, so the confusion should no longer be
    present.
    Closing this report.

     
  • Fred L. Drake, Jr.

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks