Re: [Podofo-users] Unable to build Podofo Windows 7using MinGW

2019-09-18 Thread zyx
On Tue, 2019-09-17 at 10:12 -0700, Ken Levin wrote:
> "C:\Program files (x86)\cmake\bin\cmake" -G "MinGW Makefiles"
> "C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\src" -

Hi,
the path you specify to CMake (on the second line above) is supposed to
point to the root checkout of PoDoFo, not to the 'src' subdirectory.
What I usually do is this:

   cd /my/podofo/checkout
   mkdir _build
   cd _build
   cmake -G "MinGW Makefiles" .. \
   -DCMAKE_INSTALL_PREFIX= \
   -Dxx

where the two dots above reference the checkout root, where the main
CMakeLists.txt file is located.

This is similar to what the README.html file says for the Windows
build [1], where they use ..\podofo-src. I guess you took the commands
from there. What you changed is that the podofo-debug is not created
under the checkout directory, but beside it and you confused podofo-src
with podofo\src (the first is with a dash, the second as a path
delimiter). The suggested directory structure in the README.html file
is (say checked out in C:\Projects):

   C:\Projects
 podofo-src
cmake
doc
examples
.
src
.
CMakeLists.txt
.
 podofo-debug

Note the podofo-src and podofo-debug are at the same level. Whenever I
say "checkout" above, it can be replaced with "unpack tarball with
sources".

Bye,
zyx

[1] 
https://sourceforge.net/p/podofo/code/HEAD/tree/podofo/trunk/README.html#l364



___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


[Podofo-users] Unable to build Podofo Windows 7using MinGW

2019-09-17 Thread Ken Levin

Hi,

I am an experienced programmer but relatively new to C++, CMake and 
the gcc compiler.


I am having difficulty building the Podofo library on Windows 7 Pro 
using the gcc compiler.  I have experience writing technical 
documentation would be happy to write up what I learn and post to 
help the community if that might help others who follow my path.


I created a directory called Podofo-Debug underneath the Podofo 
directory and then created the following dos batch file to install Podofo:


[Code]
SETLOCAL
SET include="c:\program files (x86)\codeblocks\mingw\include"
SET lib="c:\program files (x86)\codeblocks\mingw\lib"
SET src="C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\src"
SET builddir="C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\podofo-debug"

:: 
-DCMAKE_INSTALL_PREFIX:PATH= 
https://stackoverflow.com/questions/4669215/cmake-compilation-error
:: cmake -G "MinGW Makefiles" ..\podofo-src 
-DCMAKE_INCLUDE_PATH=c:\progra~1\gnuwin32\include 
-DCMAKE_LIBRARY_PATH=c:\progra~1\gnuwin32\lib -DPODOFO_BUILD_SHARED:BOOL=FALSE
"C:\Program files (x86)\cmake\bin\cmake" -G "MinGW Makefiles" %src% 
-DCMAKE_INSTALL_PREFIX:PATH=%builddir% -DCMAKE_INCLUDE_PATH=%include% 
-DCMAKE_LIBRARY_PATH=%lib% -DPODOFO_BUILD_SHARED:BOOL=FALSE

mingw32-make
ENDLOCAL
SET /P DUMMY="enter any key to continue..."
EXIT
[/code]

I kept getting this error:  Run cmake on the CMakeLists.txt in the 
project root, not the one in the  'src' directory.  You will need to 
delete CMakeCache.txt from the current   directory.


So, I removed the cache files (any I could find) then moved my batch 
file to the Podofo directory (one level up from Podofo-debug) and 
tried again.  I still get the same error (results are below - I put 
the error in blue text).


I am not experienced enough to understand the error and I hope it is 
something simple.


Please let me know if it would help the Community if I write up 
detailed instructions for other newbe Podofo users once I learn how.


Thanks in advance (results of my batch file are below my signature line).

Ken

[code]
C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SETLOCAL

C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SET include="c:\program files 
(x86)\codeblocks\mingw\include"


C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SET lib="c:\program files 
(x86)\codeblocks\mingw\lib"


C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SET 
src="C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\src"


C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SET 
builddir="C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\podofo-debug"


C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>"C:\Program files 
(x86)\cmake\bin\cmake" -G "MinGW Makefiles" 
"C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\src" 
-DCMAKE_INSTALL_PREFIX:PATH="C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo\podofo-debug" 
-DCMAKE_INCLUDE_PATH="c:\program files 
(x86)\codeblocks\mingw\include" -DCMAKE_LIBRARY_PATH="c:\program 
files (x86)\codeblocks\mingw\lib" -DPODOFO_BUILD_SHARED:BOOL=FALSE

-- The C compiler identification is GNU 5.1.0
-- The CXX compiler identification is GNU 5.1.0
-- Check for working C compiler: C:/Program Files 
(x86)/CodeBlocks/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/Program Files 
(x86)/CodeBlocks/MinGW/bin/gcc.exe -- works

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files 
(x86)/CodeBlocks/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/Program Files 
(x86)/CodeBlocks/MinGW/bin/g++.exe -- works

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:6 (MESSAGE):
  Run cmake on the CMakeLists.txt in the project root, not the one 
in the   'src' directory.  You will need to delete CMakeCache.txt 
from the current directory.



-- Configuring incomplete, errors occurred!
See also "C:/PBWin10/AnsiCSamples/LearnCPP/PoDoFo/CMakeFiles/CMakeOutput.log".
See also "C:/PBWin10/AnsiCSamples/LearnCPP/PoDoFo/CMakeFiles/CMakeError.log".

C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>mingw32-make
mingw32-make: *** No targets specified and no makefile found.  Stop.

C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>ENDLOCAL

C:\PBWin10\AnsiCSamples\LearnCPP\PoDoFo>SET /P DUMMY="enter any key 
to continue..."

enter any key to continue...
[/code] 


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users