[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph
From: |
Martin Lambers |
Subject: |
Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph |
Date: |
Wed, 20 Jan 2010 20:41:37 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, 20. Jan 2010, 01:39:23 +0100, Volker Grabsch wrote:
> 1) There is a bug which causes a failure of your example
> compile command for "osgstaticviewer":
>
> .../i686-pc-mingw32/bin/ld: cannot find -losgdb_svg
>
> Are you able to reproduce and to solve that issue?
On my system, libosgdb_svg.a is built by mistake, so linking succeeds.
I get a linker error only if I actually request the plugin with
USE_OSGPLUGIN(svg).
The CMAKE scripts of OSG use the default CMAKE module to work with
pkg-config, and this module does not support cross compiling. It uses
the pkg-config binary of the host unconditionally (see
/usr/share/cmake-2.6/Modules/FindPkgConfig.cmake on Debian/lenny). On my
system, it finds librsvg, and therefore decides to build the svg plugin
even though librsvg is not available in mingw-cross-env.
I forced cmake to use the correct pkg-config binary with
'-DPKG_CONFIG_EXECUTABLE=$(PREFIX)/bin/$(TARGET)-pkg-config'.
This seems to work: librsvg is not found and the SVG plugin not built.
Accordingly, I removed -losgdb_svg from openscenegraph-osgPlugins.pc.
These two small changes are in the attached, updated OSG patch.
(However, I still don't know how and why libosgdb_svg.a was built on my
system when librsvg was in fact only available for the host system.)
> 2) The command
>
> i686-pc-mingw32-pkg-config --cflags
>
> should output the "-DOSG_LIBRARY_STATIC" option.
I don't agree. Pkg-config has no way to report CFLAGS that are only
required for static linking. On a system that has both dynamic and
static OSG, pkg-config must not report -DOSG_LIBRARY_STATIC to avoid
breaking dynamic linking. So an application that decides to use static
OSG has to take care of -DOSG_LIBRARY_STATIC itself, in addition to
adding some macros to its source. We cannot hide the fact that static
OSG is used anyway, so let's not make the behaviour on mingw-cross-env
different from the behaviour on other platforms.
Martin
osg.patch
Description: Text Data
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, (continued)
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/12
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/13
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/13
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/16
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/16
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/17
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/19
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph,
Martin Lambers <=
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/20
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/20
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/21
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/21
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/21
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/22
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/22
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/26
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Martin Lambers, 2010/01/26
- Re: [Mingw-cross-env-list] [PATCH] Add OpenSceneGraph, Volker Grabsch, 2010/01/26