On Sun, Feb 22, 2009 at 10:42 AM, Viktor Szakáts <[email protected]> wrote:

> BTW, however I detest .dlls, I'm working on GNU-make support
> for .dlls with MSVC. Maybe even BCC, if its tools make it
> possible. For me this is only important to make GNU-make
> equal in feature with non-GNU so we can drop the latter. But
> still, making these the default is going totally the wrong way IMO.
> We should provide it for those who need it but not for Harbour
> core please.

I don't wants to force you to use shared libs simply under Linux
static linking is deprecated.

Look in https://fedoraproject.org/wiki/Packaging/Guidelines
...
  Packaging Static Libraries

    * In general, packagers are strongly encouraged not to ship static
libs unless a compelling reason exists.
...

or Debian http://www.debian.org/doc/debian-policy/ch-sharedlibs.html
...
In some cases, it is acceptable for a library to be available in
static form only; these cases include:
...

so if we want to see harbour included someday in "main" distributions,
we have to provide both shared and static or only shared but never
only static and the shared support has to work out of the box.

F.e. I've added these switches to hb* scripts:

    -gd                 # link with hbgd library (GD interface)
    -curl               # link with hbcurl library (cURL interface)
    -odbc               # link with hbodbc library (ODBC interface)
    -pgsql              # link with hbpgsql library (PostgeSQL interface)
    -mysql              # link with hbmysql library (MySQL interface)
    -xhgtk              # link with xHGtk library (GTK+ interface)

and I build the shared libs at the end of the make_gnu.sh using:
...
       HB_SHARED_LIB="libhbpgsql"

       if [ -f "$HB_SHARED_LIB.a" ]; then
          echo "Creating shared lib $HB_SHARED_LIB..."
          if [ "$HB_ARCHITECTURE" = "linux" ]; then
             hb-mkslib $HB_SHARED_LIB "$HB_SHARED_LIB.a" -lpq
          fi
          if [ "$HB_ARCHITECTURE" = "win" ]; then
             hb-mkslib "$HB_BIN_INSTALL/$HB_SHARED_LIB.dll"
"$HB_SHARED_LIB.a" -L$HB_DIR_PGSQL/lib -lpq
$HB_BIN_INSTALL/harbour.dll $HB_DIR_PGSQL/bin/libpq.dll
          fi
          if [ "$HB_ARCHITECTURE" = "darwin" ]; then
             hb-mkslib $HB_SHARED_LIB "$HB_SHARED_LIB.a"
-L$HB_DIR_PGSQL/lib -lpq
          fi
       fi
...

there are surely better way to do it, but IMHO build system has to
provide the support for a full shared env.

How this can be done using hbmk2?

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to