Hi,

I am trying to explore PoDoFo for parsing PDF files. So I tried to build it on Visual studio following the procedure in the ReadMe.html that came with the package.

So i used the following cmake command:

cmake -G "Visual Studio 9 2008" -DCMAKE_INCLUDE_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\include" -DCMAKE_LIBRARY_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\objs\win32\vc2013;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\lib;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\lib" -DPODOFO_BUILD_SHARED:BOOL=FALSE -DFREETYPE_LIBRARY_NAMES_DEBUG=freetype245MT_D -DFREETYPE_LIBRARY_NAMES_RELEASE=freetype245MT ..

I got the build files as the readme said. I build the entire solution but it gives me a bunch of errors. One error that worries me is this:

Error   27  error LNK1104: cannot open file 'podofo.lib'    D:\Podofo_for_VS\podofo\build_vs\test\CreationTest\LINK CreationTest

I am trying to get the lib file of podofo in the process of building the same.

Can someone tell me what is going wrong here, or what i might have done wrong in the process.

Is the podofo.lib file located in the directories you have listed?

I would guess that the errors you got prior to this one prevented the "podofo.lib" library from getting built correctly, which is why it wasn't found later on when it was needed (by the "CreationTest" program).

When it comes to dealing with compilation or linking errors, the rule is to always start from the first error that comes up. The errors that appear last are usually caused by the errors that came before. So, always start from the top, and don't worry about last errors until you've fixed all the errors before that.

Thanks for the inputs NathanOliver and mike_2000_17. The problem was pretty simple, it was I who complicated things. So this is what i did. i had build the project into a build_VS directory then i made a copy of the same to another directory thinking i will keep the original build just incase (a very bad move). In the copied folder I was getting this error, like mike_2000_17 said i started resolving the issues from top, one thing led to another and i realised that all the paths in VC++ directories were actually pointing to the build_VS folder. So so scarapped the new directory and complied the solution in build_VS. This did the trick!

Points to add:
podofo 0.9.3 will now compile in any version above VS 2008, ( I have checked in 2008 and all above versions) although once you have the sln migration to other versions is not an issue (I have migrated to Visual studio 2013 community)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.