[osg-users] freetype build support on Windows

Robert Osfield robert.osfield at gmail.com
Thu Jun 2 05:21:50 PDT 2016


Hi Stuart,

The PNG link in freetype is something we can't hardwire into the OSG's
freetype plugin as it will break the build for those who use freetype
without PNG and don't have png available.

Could you check the CMake FindFreetype.cmake to see if it has any var
for additional libraries that are required, I'd hope that something
like this will be picked up automatically so we can use this rather
than jump through hoops to handle and edge case like using Freetype
with PNG.

On the warnings front, please post them for discussion.  I currently
don't see any warnings when building under Windows, but I have VS2013
installed so this might be the difference.

In general I'd like to clean up warnings, but we have be careful as
fixing warnings can introduce bugs as well as fix bugs.  In most cases
fixing warnings doesn't fix actual bugs, so any risk of introducing
bugs has to be warranted and double checked to avoid this risk.  And
yes on a number of occasions bugs have been introduced by warning
fixes, we have been burnt even when taking care.

In cases where the compiler is just generating warnings that are not
helpful and are too intrusive to fix I feel can be warranted to simply
disable the warning.

Robert.


On 2 June 2016 at 12:55, Stuart Mentzer <osgforum at tevs.eu> wrote:
>
> robertosfield wrote:
>> Could you please try a build with the latest that I've checked in and
>> see what happens.
>
>
> Trying with Visual C++ 2015...
>
> I've been enabling PNG support in my freetype lib build (-DWITH_PNG=ON) and this causes unresolved png symbols when linking osgdb_freetype.dll since I'm enabling PNG support :
>
> Code:
> [ 94%] Linking CXX shared module osgdb_freetype.dll
> freetype.lib(sfnt.c.obj) : error LNK2019: unresolved external symbol png_create_read_struct referenced in function Load_SBit_Png
> freetype.lib(sfnt.c.obj) : error LNK2019: unresolved external symbol png_set_longjmp_fn referenced in function Load_SBit_Png
> ...
> osgdb_freetype.dll : fatal error LNK1120: 23 unresolved externals
>
>
>
> This is why I made that PNG change in my submission code. I don't know if we want/need to support PNG in freetype for OSG purposes but for now I'll try again with it disabled and let you know what happens.
>
> BTW I also see a lot of base class initialization warnings:
>
>
> Code:
> C:\Projects\OSG\OpenSceneGraph\include\osg/OperationThread(80): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced'
> C:\Projects\OSG\OpenSceneGraph\include\osg/OperationThread(80): note: virtual base classes are only initialized by the most-derived type
> C:\Projects\OSG\OpenSceneGraph\include\osg/OperationThread(84): warning C4589: Constructor of abstract class 'osg::Operation' ignores initializer for virtual base class 'osg::Referenced'
> C:\Projects\OSG\OpenSceneGraph\include\osg/OperationThread(84): note: virtual base classes are only initialized by the most-derived type
>
>
>
> There were other warnings that may be meaningful when I built 3.4.0. If it would be helpful to work towards reducing them I'm willing to give it some time.
>
> Stuart
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67347#67347
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list