CMAKE - Installing podofo issues/Zlib??

I am trying to build PODOFO a pdf library. It requires zlib in the installation process. I'm using MingW on Windows XP.

I have built zlib using the command prompt and this is what I have entered.

mingw32-make -f win32\Makefile.gcc

This builds the required files without error.

In CMAKE, i am using the latest version. It has a GUI interface so there's nowhere to enter command prompts.

I direct it to the source-code and the build directory for PODOFO and specify the location of the ZLIB_INCLUDE_DIRECTORY and the ZLIB_LIBRARY. As far as I can see they are both the same......

THEN.. When I run CMAKE, it can't find the ZLIB_LIBRARY ... I'm astonished..
How can this be.. Is there a specific file it is looking for??? From what I can gather there is a zlib1.dll file in that directory but not sure what else would be relevant. So the whole process stops with this error.

ALSO

I want this to be linked statically to my applications (I'm using Code::Blocks with MingW compiler) and want to build projects without including a DLL every time. The PODOFO installation instructions tell me to enter :
-DPODOFO_BUILD_SHARED=FALSE.... where do I enter this??? I've tried putting it in the PODOFO CMake List file and it just causes an error when I run CMAKE?

Could somebody please help me,, I've been on this for weeks and its driving me crazy..

Thanks

Last edited on
has anyone ever used cmake?
why do you use cmake?

Code::Blocks can easily create a project for you
Have you ever used PODOFO..? Not that simple..

It has to be build and there are a few dependencies. I was hoping someone out there may know something. As far as I can see, and from the comments around the web, PODOFO requires a computer scientist to get it running. I'm dumbfounded as to why this is so difficult. Was meant to start this project 3 months ago and I can't even get PODOFO working yet...
i downloaded cmake lately. it still has the command line tool cmake.exe. Look at the bin of the cmak path.

I mean it just generates makefiles. When there's already a working makefile why do you need another makefile?
I believe CMAKE creates a makefile which integrates podofo, zlib and libjpeg so they can be used in the compilation process. All these libraries have their own makefiles..
I believe CMAKE creates a makefile which integrates podofo, zlib and libjpeg so they can be used in the compilation process.
No, that wouln't make too much sense. I'd say that it's aimed to create the PODOFO lib and nothing more. All the required libraries you have to add to your project settings. Which shouldn't be too hard

All these libraries have their own makefiles..
Yes, and your project also has its own makefile
-DPODOFO_BUILD_SHARED=FALSE


You run Cmake-GUI from a command prompt using specified command line arguments. If you don't know how, just change the shortcut on the desktop adding a space and specified arguments, then double-click it.
Last edited on
ok, so CMAKE creates a podofo lib then but the problem is still the same.
I'm probably about 17 years away from creating any project at the rate I'm going.

Modoran.. I'm not sure what this means?

If you don't know how, just change the shortcut on the desktop adding a space and specified arguments, then double-click it.

I don't even know what arguments to enter.. ?

The issue seems to be that CMAKE can't find the library file. I'm thinking that it could even be a build problem with ZLIB but I have now used every single version I can fine and the problem is still the same. Should I direct the
ZLIB_LIBRARY variable to zlib1.dll or is there another file which it should find or is the library in this case a series of files. If it is a series of files then why can't CMAKE see it? Here is a list of all the files and files in the sub directories of the Zlib directory. Can anyone see any files here which could possibly be considered ZLIB_LIBRARY files.

List with all Sub Directory Contents.
17/10/2012 11:05 PM <DIR> .
17/10/2012 11:05 PM <DIR> ..
10/09/2011 04:15 PM 4,968 adler32.c
17/10/2012 09:01 PM 1,332 adler32.o
17/10/2012 08:57 PM <DIR> amiga
17/10/2012 08:57 PM <DIR> as400
02/05/2012 09:12 PM 73,286 ChangeLog
29/04/2012 09:20 PM 7,227 CMakeLists.txt
11/12/2005 11:27 AM 2,520 compress.c
17/10/2012 09:01 PM 1,052 compress.o
01/05/2012 09:17 PM 25,985 configure
17/10/2012 08:57 PM <DIR> contrib
29/04/2012 04:18 PM 13,174 crc32.c
29/04/2012 04:18 PM 30,562 crc32.h
17/10/2012 09:01 PM 10,526 crc32.o
12/02/2012 05:15 PM 71,392 deflate.c
13/01/2012 10:54 PM 12,787 deflate.h
17/10/2012 09:01 PM 15,814 deflate.o
17/10/2012 08:57 PM <DIR> doc
17/10/2012 09:01 PM 75,776 example.exe
17/10/2012 09:01 PM 9,472 example.o
17/10/2012 08:57 PM <DIR> examples
17/10/2012 09:01 PM 12,800 example_d.exe
27/11/2011 03:15 PM 16,573 FAQ
13/02/2010 05:12 PM 678 gzclose.c
17/10/2012 09:01 PM 454 gzclose.o
17/03/2012 09:45 PM 6,029 gzguts.h
18/03/2012 02:52 PM 15,825 gzlib.c
17/10/2012 09:01 PM 4,729 gzlib.o
18/02/2012 03:15 PM 18,518 gzread.c
17/10/2012 09:01 PM 4,655 gzread.o
03/03/2012 10:28 AM 15,817 gzwrite.c
17/10/2012 09:01 PM 3,594 gzwrite.o
11/03/2012 10:16 AM 1,988 INDEX
18/12/2011 11:39 AM 22,701 infback.c
17/10/2012 09:01 PM 8,479 infback.o
18/04/2010 09:16 PM 13,439 inffast.c
18/04/2010 09:16 PM 427 inffast.h
17/10/2012 09:01 PM 2,768 inffast.o
05/10/2011 08:32 PM 6,332 inffixed.h
12/02/2012 03:20 PM 52,982 inflate.c
25/12/2009 05:32 PM 6,399 inflate.h
17/10/2012 09:01 PM 15,317 inflate.o
12/02/2012 05:15 PM 13,032 inftrees.c
18/04/2010 09:15 PM 2,928 inftrees.h
17/10/2012 09:01 PM 3,326 inftrees.o
17/10/2012 09:01 PM 89,408 libz.a
17/10/2012 09:01 PM 45,552 libz.dll.a
09/09/2011 11:33 PM 100 Makefile
22/04/2012 10:58 PM 9,004 Makefile.in
09/03/2012 07:43 PM 26,402 make_vms.com
17/10/2012 09:01 PM 71,680 minigzip.exe
17/10/2012 09:01 PM 4,304 minigzip.o
17/10/2012 09:01 PM 9,216 minigzip_d.exe
17/10/2012 08:57 PM <DIR> msdos
17/10/2012 08:57 PM <DIR> nintendods
17/10/2012 08:57 PM <DIR> old
17/10/2012 11:05 PM 0 print.txt
17/10/2012 08:57 PM <DIR> qnx
12/02/2012 05:15 PM 5,185 README
17/10/2012 08:57 PM <DIR> test
12/02/2012 05:15 PM 3,135 treebuild.xml
07/01/2012 03:08 PM 44,161 trees.c
18/04/2010 10:32 AM 8,472 trees.h
17/10/2012 09:01 PM 13,144 trees.o
17/01/2010 10:34 AM 1,994 uncompr.c
17/10/2012 09:01 PM 722 uncompr.o
17/10/2012 08:57 PM <DIR> watcom
17/10/2012 08:57 PM <DIR> win32
29/04/2012 04:18 PM 15,291 zconf.h
29/04/2012 04:18 PM 15,342 zconf.h.cmakein
29/04/2012 04:18 PM 15,291 zconf.h.in
02/05/2012 09:12 PM 4,235 zlib.3
02/05/2012 09:12 PM 8,760 zlib.3.pdf
02/05/2012 09:12 PM 86,717 zlib.h
02/02/2012 12:25 AM 1,119 zlib.map
11/03/2012 10:16 AM 294 zlib.pc.cmakein
17/04/2010 11:48 PM 254 zlib.pc.in
17/10/2012 09:01 PM 80,384 zlib1.dll
14/10/2006 09:45 AM 3,895 zlib2ansi
17/10/2012 09:01 PM 992 zlibrc.o
12/02/2012 03:20 PM 7,412 zutil.c
03/03/2012 01:20 AM 6,765 zutil.h
17/10/2012 09:01 PM 987 zutil.o
70 File(s) 1,185,880 bytes
14 Dir(s) _____________ bytes free
Last edited on
I don't see your problem? If the libraries are all properly build (the .a file is created) put that cmake aside and create a project with Code::Blocks

In case you don't know how to add a lib to your project, look at this (example):

http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-codeblocks/


in the directory you showed is no zlib.a/zlib1.a or any .a for zlib
You're completely missing the point.

I am trying to build a library for PODOFO (which is a pdf library for manipulating and creating pdf files). It has dependencies and one of those dependencies is zlib. This means that if I am going to build a library for PODOFO using Cmake I need zlib. The zlib library is therefore built first, also libjpeg, also freetype2.

When I go to create the PODOFO library using CMAKE it finds the ZLIB_INCLUDE_DIR (remember, we're creating a PODOFO library) but it can't fine ZLIB_LIBRARY. It tells me that in the error. The library (which as I've mentioned, I've built already) is in the Zlib directory. The contents of that directory are shown above. All the library files are dated 17/10/2012 'above'.

Let's throw away the idea of creating a project, lets not even use the word.
By the looks of things, I'll never even get to that stage because I can't create a library for PODOFO and I haven't come across one person who has.....
Last edited on
ZLIB_LIBRARY must point to full path to libzlib1.a and ZLIB_INCLUDE_DIRECTORY must point to directory where zlib.h can be found. These are environment variables, I hope you know how to set them.

If this does not work, edit zlib.cmake and cancel the zlib check (it is a text file, make it returns true always). This file came with PODOFO library. Then edit your project settings to compile and link correctly.
Last edited on
Thank you modoran.. Great answer, I may finally get somewhere with that.
I'll let you know how it goes.
Hi modoran..

There is no file called libzlib1.a but I tried a few of the others and I just get the same error. This should work as is but I'm dumbfounded as to why there is this incompatibility. Maybe PODOFO will only really work on linux and wasn't meant for windows..

is there supposed to be a libzlib1.a ?
There must be somebody out there who has installed zlib or podofo before. I can't believe this. ...??

Can someone suggest how to build zlib with MingW and create a Debug and Release Version?

This is what PODOFO seems to require so if I can do that them this should work?

I have MSYS installed as well if that is a prerequisite.
OK... Some progress.

In the zlib makefile set the below macros as follows. They are both in the zlib Makefile.gcc with the # sign in front of them. Remove this # sign.


LOC = -DDEBUG -g


There's also a LOC = -DASMV variable but not sure what the -DASMV is, still investigating, but when I ran this, it seemed to work.. May have spoken too soon as I have other dependencies to worry about not but I'm getting warmer..

Anyone know what -DASMV is?
Last edited on
Topic archived. No new replies allowed.