I managed to successfully compile and link by using freetype-2.3.4 (It seems that freetype.lib file is missing from freetype-2.3.5).

I then put the freetype6.dll, podofo.dll, zlib.dll and jpeg62.dll files in to the debug folder of podofouncompress and am able to run it.  I currently get a crash - but just wanted to put the info about the freetype lib up.

Ed.

Edward Ross wrote:
Hi Craig,

Now I'm making some progress - thanks for the help.

Just to clarify I understood that the idea of cmake is to make the project files for Visual Studio.  But I thought that cmake was part of MinGW (like the unix tools that run under cygwin).  Having the cmake.org URL in the readme would be useful for newbies to the cmake and mingw like me to get going.

I also find the revised form of this paragraph very clear:
"If your application or library uses Visual Studio, CMake can be used to
build a Visual Studio project you can use. Alternately, if you are using
MinGW for your existing code, CMake can make you a MinGW makefile to
build a mingw compatible version of PoDoFo."
I've installed freetype and zlib from gnuwin32, and run cmake.  But it can't find freetype.lib - which is missing from c:\program files\gnuwin32\lib.  The output from cmake is below.  I tried downloading the freetype-2.3.5 sources, creating a visual studio project with jam and then copying the freetype235MT.lib into the gnuwin32 folder as freetype.lib.  This allowed the cmake project generation to complete - but visual studio can't link against the freetype lib.

Do you know where I could get a working freetype lib from or what settings I should use to compile freetype correctly?

Many thanks,

Ed.

------------------------------------------------------------

C:\dev\pdf\podofo>cmake -G "Visual Studio 8 2005" ..\podofo-0.5.0 -DCMAKE_INCLUD
E_PATH=C:\progra~1\gnuwin32\include -DCMAKE_LIBRARY_PATH=c:\progra~1\gnuwin32\li
b
-- Check for working C compiler: cl
-- Check for working C compiler: cl -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: cl
-- Check for working CXX compiler: cl -- works
Both PODOFO_BUILD_SHARED and PODOFO_BUILD_STATIC set
  so disabling static library generation (CMake version < 2.5)
Found zlib headers in C:/progra~1/gnuwin32/include, library at C:/Program Files/
GnuWin32/lib/zlib.lib
Found libjpeg headers in C:/progra~1/gnuwin32/include, library at C:/Program Fil
es/GnuWin32/lib/jpeg.lib
Found ft2build.h in C:/progra~1/gnuwin32/include
Found freetype/config/ftheader.h in C:/progra~1/gnuwin32/include/freetype2
Found freetype library at LIBFREETYPE_LIB-NOTFOUND
Found freetype library at LIBFREETYPE_LIB-NOTFOUND
Found STLPort headers in LIBSTLPORT_HEADERS-NOTFOUND
Found STLPort library in LIBSTLPORT_LIB-NOTFOUND
Found fontconfig.h at LIBFONTCONFIG_H-NOTFOUND/fontconfig/fontconfig.h
Found fontconfig library at LIBFONTCONFIG_LIB-NOTFOUND
Building shared PoDoFo library
PDEBUG: USING_SHARED_PODOFO: TRUE
PDEBUG: PODOFO_DEPEND_TARGET: podofo_shared
CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
LIBFREETYPE_LIB

-- Configuring done

------------------------------------------------------------

1>------ Build started: Project: podofo_shared, Configuration: Debug Win32 ------
1>Linking...
1>   Creating library Debug\podofo.lib and object Debug\podofo.exp
1>PdfFontCache.obj : error LNK2019: unresolved external symbol __imp__FT_Init_FreeType referenced in function "public: __thiscall PoDoFo::PdfFontCache::PdfFontCache(class PoDoFo::PdfVecObjects *)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@1@@Z)
1>PdfFontCache.obj : error LNK2019: unresolved external symbol __imp__FT_Done_FreeType referenced in function "public: __thiscall PoDoFo::PdfFontCache::~PdfFontCache(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
1>PdfFontCache.obj : error LNK2019: unresolved external symbol __imp__FT_Get_Postscript_Name referenced in function "public: class PoDoFo::PdfFont * __thiscall PoDoFo::PdfFontCache::GetFont(struct FT_FaceRec_ *,bool)" ([EMAIL PROTECTED]@PoDoFo@@[EMAIL PROTECTED]@PAUFT_FaceRec_@@[EMAIL PROTECTED])
1>PdfFontMetrics.obj : error LNK2001: unresolved external symbol __imp__FT_Get_Postscript_Name
1>PdfFontMetrics.obj : error LNK2019: unresolved external symbol __imp__FT_New_Memory_Face referenced in function "public: __thiscall PoDoFo::PdfFontMetrics::PdfFontMetrics(struct FT_LibraryRec_ * *,char const *)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@[EMAIL PROTECTED])
1>PdfFontMetrics.obj : error LNK2019: unresolved external symbol __imp__FT_New_Face referenced in function "public: __thiscall PoDoFo::PdfFontMetrics::PdfFontMetrics(struct FT_LibraryRec_ * *,char const *)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@@[EMAIL PROTECTED])
1>PdfFontMetrics.obj : error LNK2019: unresolved external symbol __imp__FT_Done_Face referenced in function "public: virtual __thiscall PoDoFo::PdfFontMetrics::~PdfFontMetrics(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
1>PdfFontMetrics.obj : error LNK2019: unresolved external symbol __imp__FT_Load_Char referenced in function "private: void __thiscall PoDoFo::PdfFontMetrics::InitFromFace(void)" ([EMAIL PROTECTED]@PoDoFo@@AAEXXZ)
1>PdfFontMetrics.obj : error LNK2019: unresolved external symbol __imp__FT_Set_Char_Size referenced in function "public: void __thiscall PoDoFo::PdfFontMetrics::SetFontSize(float)" ([EMAIL PROTECTED]@PoDoFo@@[EMAIL PROTECTED])
1>Debug\podofo.dll : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://c:\dev\pdf\podofo\src\podofo_shared.dir\Debug\BuildLog.htm"
1>podofo_shared - 10 error(s), 0 warning(s)
2>------ Build started: Project: podofouncompress, Configuration: Debug Win32 ------
2>Linking...
2>Embedding manifest...
2>Build log was saved at "file://c:\dev\pdf\podofo\tools\podofouncompress\podofouncompress.dir\Debug\BuildLog.htm"
2>podofouncompress - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========



Craig Ringer wrote:
Edward Ross wrote:
  
 Many thanks for the information.  I'm completely unfamiliar with mingw
and cmake.  I've downloaded and installed and installed mingw, but I
can't find cmake - could you let me know where I can get cmake for mingw
please?
    

You do not need MinGW - you can and probably should use Visual Studio if
you're used to it and prefer it. Remember that C++ code is not binary
compatible between different compilers, so if you build your main app
with Visual Studio 6 you must also build PoDoFo with Visual Studio 6, as
explained in the "CMake builds with Windows" section of the README.

As for CMake - there's no "CMake for Visual Studio". CMake is standalone
and targets a variety of tools on each platform. I have failed to
document installing CMake as part of the PoDoFo install instructions -
partly because it's amazingly easy.

Go to cmake.org
Download the current CMake binary release
Install it

You're done. It auto-detects MinGW, various Visual Studio versions, etc;
no further setup should be required.

  
Looking at the install instructions - I've tried the provided VS project
files route already.  So I guess I'll now try generating Visual Studio
project files with CMake.  But I'm a little confused by the second
sentence  - are MinGW Makefiles the same thing as using CMake to
generate Visual Studio project files?
    

No. MinGW is completely different to Visual Studio - it's a port of the
GNU C/C++ compiler to Windows.

The instructions cover several ways to build on Windows, because Windows
developers use a variety of tools and work in a variety of ways. In your
case, you want to use CMake to generate Visual Studio project files. You
don't need to have anything to do with MinGW.

  
"On Windows, it is recommended that you use CMake to generate Visual Studio
project files appropriate for your VS version and your libraries. You
can also generate NMake builds or MinGW Makefiles (see "Installation with CMake").
    

Read "CMake builds on Windows" and "CMake builds on Windows with Visual
Studio" in the README. If anything is still unclear, let me know.

The point above could perhaps be more explicitly stated as:

"If your application or library uses Visual Studio, CMake can be used to
build a Visual Studio project you can use. Alternately, if you are using
MinGW for your existing code, CMake can make you a MinGW makefile to
build a mingw compatible version of PoDoFo."

  
Alternately, Windows users can use the provided Visual Studio
Solution/Project
files after placing the other libraries in a directory inside of the podofo
directory."
    

Yep, that's hopelessly out of date and has been removed from the current
development version, along with the project file referred to.

--
Craig Ringer


  


-- 

Edward Ross
Exorbyte GmbH
UK Office: +44 (0)845 6800061
DE Office: +49 (0)7531 3633900
Fax: +44 (0)845 6800062
http://www.exorbyte.com

------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users


-- 

Edward Ross
Exorbyte GmbH
UK Office: +44 (0)845 6800061
DE Office: +49 (0)7531 3633900
Fax: +44 (0)845 6800062
http://www.exorbyte.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to