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=<path_to_install_directory>
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