[osg-users] Failed loading osgdb_freetype.dll

95 views
Skip to first unread message

Andreas Haßler

unread,
Dec 10, 2008, 1:15:35 PM12/10/08
to osg-...@lists.openscenegraph.org
Hi,

we have the following problems:

We use osg-2.6.0
(http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.6/OpenSceneGraph-2.6.0.zip)
and the 3rdPartyLibraries
(https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty_win32binaries_vs80sp1,
Revision 531).

We have developed an application with visual studio and the instructions here:

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio


The 3rdPartyLibraries are installed and can be found. When running our
application, we only see some small fonts, there must be something wrong with
the freetype-library.

Then, I set OSG_NOTIFY_LEVEL=debug an run the application again.
Here's the interesting output:

FindFileInPath() : USING C:\<some_path>\osgPlugins-2.6.0\osgdb_freetype.dll
DynamicLibrary::failed loading "osgPlugins-2.6.0/osgdb_freetype.dll"
No valid object found for C:\<some_path>\fonts\arial.ttf


The osgdb_freetype.dll is in the right path and is found by OSG. But it cannot
be loaded.


I checked the dependencies of osgdb_freetype.dll with the dependency walker of
Visual Studio, and I noticed that DWMAPI.DLL is not found on the system.


We have tested the applications on several windows-systems:

-- 2x Windows XP
-- 2x Windows XP Media Center Edition


First we think, the problems are only with the Media Center Edition, but this
isn't true. We have actually

-- one Windows XP and one Windows XP Media Center Edition the osgdb_freetype.dll
is loaded and works without problems

-- one Windows XP and one Windows XP Media Center Edition the osgdb_freetype.dll
is not loaded and it appears the described OSG-debug-message


On some systems is DWMAPI.DLL installed and can be found. On other systems is
DWMAPI.DLL never used for osgdb_freetype.dll (as seen in the dependency walker)???


Can someone help me, I have no idea what to do.

Thanks
Andreas
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

christophe loustaunau

unread,
Dec 10, 2008, 1:24:37 PM12/10/08
to OpenSceneGraph Users

Hi Andreas,

What version of visual Studio do you use ?


These third party was compiled with the service pack 1 of visual studio, do you have it ?

Regards.

--
Christophe Loustaunau.

Jean-Sébastien Guay

unread,
Dec 10, 2008, 1:25:30 PM12/10/08
to OpenSceneGraph Users
Hello Andreas,

> The 3rdPartyLibraries are installed and can be found. When running our
> application, we only see some small fonts, there must be something wrong with
> the freetype-library.
>
> Then, I set OSG_NOTIFY_LEVEL=debug an run the application again.
> Here's the interesting output:
>
> FindFileInPath() : USING C:\<some_path>\osgPlugins-2.6.0\osgdb_freetype.dll
> DynamicLibrary::failed loading "osgPlugins-2.6.0/osgdb_freetype.dll"
> No valid object found for C:\<some_path>\fonts\arial.ttf

There has been some discussion about this before (pretty often
actually), so please check the archives. It's probably related to the
version of Visual Studio with which you compiled OSG versus the version
which was used to compile the dependencies. Which version of Visual
Studio are you using?

The DWMAPI.DLL is a false-positive that Dependency Walker often gives,
you start to recognize these after a while. It doesn't have anything to
do with the problem.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay jean-seba...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/

Tomlinson, Gordon

unread,
Dec 10, 2008, 3:09:58 PM12/10/08
to OpenSceneGraph Users
Have you installed the correct Microsoft re-distributables on all the machines that match VS2005/VC8 and SP1 ?
And are all the machines at the same windows patch level ?


Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email : gtomlinson @ overwatch.textron.com
__________________________________________________________
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura

Ümit Uzun

unread,
Dec 10, 2008, 4:42:28 PM12/10/08
to OpenSceneGraph Users
Hi Andreas,

I hd same problem in VisualStudio and found a solution by debugging new version of freetype library in my system and then all works well. You really should debug it on your own system in last version.

HTH. Best Regards.


2008/12/10 Tomlinson, Gordon <GTOML...@overwatch.textron.com>



--
Ümit Uzun

Andreas Haßler

unread,
Dec 11, 2008, 6:14:30 AM12/11/08
to OpenSceneGraph Users
Hi,

installing the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) from

http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en

solves the problems.

Thanks a lot for your help

Andreas Haßler

unread,
Jan 6, 2009, 3:07:32 AM1/6/09
to OpenSceneGraph Users
Dear all,

you might find this information useful. Feel free to include it into
your documentation.

Best regards,
Andreas

1) Download the OSG source-files from

http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.6/OpenSceneGraph-2.6.0.zip

and extract all files to e.g. C:\home\bob\openscenegraph

2) Checkout the prebuilt OSG 3rdParty libraries (revision 531) for windows from

https://osgtoy.svn.sourceforge.net/svnroot/osgtoy/3rdParty/branches/3rdParty_win32binaries_vs80sp1

to e.g. C:\home\bob\3rd_party

3) CMake

- Download CMake from
http://www.cmake.org/files/v2.4/cmake-2.4.8-win32-x86.zip
- Extract to [somewhere].

4) Execute [somewhere]\cmake-2.4.8-win32-x86\bin\CMakeSetup.exe

- Where is the source code: C:\home\bob\openscenegraph
- Where to build the binaries: C:\home\bob\openscenegraph-bin (for example)
- "Configure"
- Select Generator, Build For: Visual Studio 8 2005
- "OK"

5) Configure (I only list changed ones; also, not everything is necessary, so
adapt to your needs):

- ACTUAL_3RD_PARTY_DIR=C:/home/bob/3rd_party
BUILD_OSG_EXAMPLES=ON
CMAKE_INSTALL_PREFIX=C:/home/bob/openscenegraph-installed (for example)
- "Configure"
- BUILD_MFC_EXAMPLE=ON
- "Configure"
- Mark "Show advanced values"
- Set FREETYPE_INCLUDE_DIR_freetype2 to value of FREETYPE_INCLUDE_DIR/freetype
- Set FREETYPE_INCLUDE_DIR_ft2build to value of FREETYPE_INCLUDE_DIR
- "OK"

6) Build

- Open C:\home\bob\openscenegraph-bin\OpenSceneGraph.sln
- Choose solution configuration "Release" (or any other, if you like)
- Build ("F7", or right-click on solution, choose "Build Solution")

7) Install in C:/home/bob/openscenegraph-installed

- Right-click on VS-Project 'INSTALL' within the solution, choose "Build"
- Furtheron, you can use the installed
C:/home/bob/openscenegraph-installed/[include|lib|...]
as a source for your projects.


8) Install redistributable packages for Visual Studio 2005 (in this order)

You need the redistributables if your version of Visual Studio with which
you compiled OSG was different from the version which was used to compile the
3rdParty libraries.
So if you don't use Visual Studio 2005 with Service Pack 1, you have to
install the redistributable packages:


- Microsoft Visual C++ 2005 Redistributable Package (x86)

http://www.microsoft.com/Downloads/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee
File: vcredist_x86.exe

- Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)

http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647
File: vcredist_x86.exe

9) Using the OSG libs as dependencies in a Visual Studio solution

- In your project's properties, use the environment variable OSG_ROOT to get
Visual Studio to find the OSG libraries:
- Properties - C/C++ - General - Additional Include Directories =
$(OSG_ROOT)\include
- Properties - Linker - General - Additional Library Directories =
$(OSG_ROOT)\lib
- Properties - Linker - Input - Additional Dependencies = (any OSG library
your project needs - for example: osg.lib osgGA.lib osgDB.lib osgViewer.lib
osgText.lib osgUtil.lib OpenThreads.lib)

Jean-Sébastien Guay

unread,
Jan 6, 2009, 9:34:43 AM1/6/09
to OpenSceneGraph Users
Hello Andreas,

> you might find this information useful. Feel free to include it into
> your documentation.

All this info is already on the Visual Studio-specific page on the Wiki:

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

*Except* the part about the Visual Studio redistributables. Please add
any information you find useful. To edit the wiki you need to login with
the info located here:

http://www.openscenegraph.org/projects/osg/wiki/Community/WikiLogIn

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay jean-seba...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/

Максим Гаммер

unread,
Jan 10, 2009, 3:39:39 AM1/10/09
to OpenSceneGraph Users


2009/1/6 Jean-Sébastien Guay <jean-seba...@cm-labs.com>



check  zlib1.dll version
Reply all
Reply to author
Forward
0 new messages