I'm trying to build a CPP library and have set the CPP Include path as below.
I Am using Windows XP with MinGW compiler.

VARIABLE NAME: CPLUS_INCLUDE_PATH

VARIABLE VALUE: C:\CodeBlocks\MinGW\lib\gcc\mingw32\4.4.1\include\c++

I have restarted my PC several times but I still get an error message telling me that the file it is referencing (which is in this directory),, doesn't exist and the directory doesn't exist?

Any clues?? Maybe the variable I have used is only for Unix or something like that?

Could someone please help with this....

Let me put this another way... If I have an additional Include directory to add to PODOFO so when I build it using MingW, it can access that extra include directory, where to I put it? I have added a few different Environmental variables but can't seem to get the compiler ot see it. A MingW include directory is set how? There must be a variable which it will recognise. ?

?

Well it must be a very good question as nobody in the entire universe of programmers can answer it. Cross thread or not... Nobody has answered that one either.

I'm building a Static library too.. The link above is for DLL. Not using Code::Blocks to build this, I'm using a makefile generated by Cmake to build my project. I then go to MinGW to build the library and get an error no matter what I do. Its telling me it can't see this directory and I'm certain that it's actually not possible to include it at all, which could mean that this software won't operate on Windows. I'm trying to build a library for PODOFO which to my knowledge is almost impossible.

This is the directory I want to include. Trying to put it in Environmental variables but of course 50 different variables isn't enough. What on earth could it be?

C:\CodeBlocks\MinGW\lib\gcc\mingw32\4.4.1\include\c++

Can you please post your entire error message?

Please see below. I've pasted the entire output from the cmd line.

The error is in the bottom 20 or so lines.

sh: Makefile: command not found

xxxx@XXXX-E0A0BDAF9E ~
$ make
make: *** No targets specified and no makefile found.  Stop.

xxxx@XXXX-E0A0BDAF9E ~
$ cmake Makefile
CMake Error: The source directory "C:/msys/1.0/home/xxxx/Makefile" does not exis
t.
Specify --help for usage, or press the help button on the CMake GUI.

xxxx@XXXX-E0A0BDAF9E ~
$ cd C:/podofo-0.9.1/podofo-debug

xxxx@XXXX-E0A0BDAF9E /c/podofo-0.9.1/podofo-debug
$ make
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\podofo-0.9.1\podofo-debug>cmake Makefile
CMake Error: The source directory "C:/podofo-0.9.1/podofo-debug/Makefile" is a f
ile, not a directory.
Specify --help for usage, or press the help button on the CMake GUI.

c:\podofo-0.9.1\podofo-debug>cmake make
CMake Error: The source directory "C:/podofo-0.9.1/podofo-debug/make" does not e
xist.
Specify --help for usage, or press the help button on the CMake GUI.

c:\podofo-0.9.1\podofo-debug>make
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\podofo-0.9.1\podofo-debug>cmake Makefile
CMake Error: The source directory "C:/podofo-0.9.1/podofo-debug/Makefile" is a f
ile, not a directory.
Specify --help for usage, or press the help button on the CMake GUI.

c:\podofo-0.9.1\podofo-debug>cmake /Makefile
CMake Error: The source directory "/makefile" does not appear to contain CMakeLi
sts.txt.
Specify --help for usage, or press the help button on the CMake GUI.

c:\podofo-0.9.1\podofo-debug>make /Makefile
make[2]: *** No rule to make target `/Makefile'.  Stop.

c:\podofo-0.9.1\podofo-debug>Makefile
'Makefile' is not recognized as an internal or external command,
operable program or batch file.

c:\podofo-0.9.1\podofo-debug>mingw32-make -f Makefile
[  1%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfArray.cpp.ob
j
[  2%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfCanvas.cpp.o
bj
[  2%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfColor.cpp.ob
j
[  3%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfContentsToke
nizer.cpp.obj
[  4%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfData.cpp.obj

[  5%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfDataType.cpp
.obj
[  5%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfDate.cpp.obj

C:\podofo-0.9.1\src\base\PdfDate.cpp: In member function 'void PoDoFo::PdfDate::
CreateStringRepresentation()':
C:\podofo-0.9.1\src\base\PdfDate.cpp:82: warning: format '%+03d' expects type 'i
nt', but argument 4 has type 'long int'
[  6%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfDictionary.c
pp.obj
[  7%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfEncoding.cpp
.obj
[  8%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfEncodingFact
ory.cpp.obj
[  8%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfEncrypt.cpp.
obj
[  9%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfError.cpp.ob
j
[ 10%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfFileStream.c
pp.obj
[ 11%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfFilter.cpp.o
bj
[ 11%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfFiltersPriva
te.cpp.obj
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp: In member function 'virtual void PoDoFo::PdfFlateFilter::BeginEncodeImpl()':
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp:474: warning: use of old-style cast
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp: In member function 'virtual void PoDoFo::PdfFlateFilter::BeginDecodeImpl(const PoDoFo::
PdfDictionary*)':
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp:534: warning: use of old-style cast
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp: In member function 'virtual void PoDoFo::PdfDCTFilter::BeginDecodeImpl(const PoDoFo::Pd
fDictionary*)':
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp:850: warning: use of old-style cast
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp: In function 'boolean PoDoFo::fill_input_buffer(jpeg_decompress_struct*)':
C:\podofo-0.9.1\src\base\PdfFiltersPrivate.cpp:986: warning: use of old-style cast
[ 12%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfImmediateWriter.cpp.obj
[ 13%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfInputDevice.cpp.obj
[ 14%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfInputStream.cpp.obj
[ 14%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfLocale.cpp.obj
[ 15%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfMemoryManagement.cpp.obj
[ 16%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfMemStream.cpp.obj
[ 17%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfName.cpp.obj
[ 17%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfObject.cpp.obj
[ 18%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfObjectStreamParserObject.cpp.obj
[ 19%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfOutputDevice.cpp.obj
[ 20%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfOutputStream.cpp.obj
[ 20%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfParser.cpp.obj
C:\podofo-0.9.1\src\base\PdfParser.cpp: In member function 'void PoDoFo::PdfParser::ReadXRefSubsection(long long int&, long long int&)'
:
C:\podofo-0.9.1\src\base\PdfParser.cpp:735: warning: unknown conversion type character 'l' in format
C:\podofo-0.9.1\src\base\PdfParser.cpp:735: warning: format '%5ld' expects type 'long int*', but argument 3 has type 'long long int*'
C:\podofo-0.9.1\src\base\PdfParser.cpp:735: warning: format '%c' expects type 'char*', but argument 4 has type 'long int*'
C:\podofo-0.9.1\src\base\PdfParser.cpp:735: warning: too many arguments for format
[ 21%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfParserObject.cpp.obj
[ 22%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfRect.cpp.obj
[ 23%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfRefCountedBuffer.cpp.obj
[ 23%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfRefCountedInputDevice.cpp.obj
[ 24%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfReference.cpp.obj
[ 25%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfRijndael.cpp.obj
[ 26%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfStream.cpp.obj
[ 26%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfString.cpp.obj
[ 27%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfTokenizer.cpp.obj
[ 28%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfVariant.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfVecObjects.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfWriter.cpp.obj
[ 30%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfXRef.cpp.obj
[ 31%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfXRefStream.cpp.obj
[ 32%] Building CXX object src/CMakeFiles/podofo_static.dir/base/PdfXRefStreamParserObject.cpp.obj
[ 32%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfAcroForm.cpp.obj
[ 33%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfAction.cpp.obj
[ 34%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfAnnotation.cpp.obj
[ 35%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfContents.cpp.obj
[ 35%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfDestination.cpp.obj
[ 36%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfDifferenceEncoding.cpp.obj
[ 37%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfDocument.cpp.obj
[ 38%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfElement.cpp.obj
[ 38%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfEncodingObjectFactory.cpp.obj
[ 39%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfExtGState.cpp.obj
[ 40%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfField.cpp.obj
[ 41%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFileSpec.cpp.obj
[ 41%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontCache.cpp.obj
C:\podofo-0.9.1\src\doc\PdfFontCache.cpp: In function 'bool PoDoFo::GetDataFromHFONT(HFONT__*, char**, unsigned int&)':
C:\podofo-0.9.1\src\doc\PdfFontCache.cpp:89: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfFontCache.cpp:91: warning: use of old-style cast
[ 42%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontCID.cpp.obj
[ 43%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFont.cpp.obj
[ 43%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontFactory.cpp.obj
[ 44%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontMetricsBase14.cpp.obj
[ 45%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontMetrics.cpp.obj
[ 46%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontMetricsFreetype.cpp.obj
[ 46%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontMetricsObject.cpp.obj
[ 47%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontSimple.cpp.obj
[ 48%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontTrueType.cpp.obj
[ 49%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontTTFSubset.cpp.obj
[ 49%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontType1Base14.cpp.obj
[ 50%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFontType1.cpp.obj
[ 51%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfFunction.cpp.obj
[ 52%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfHintStream.cpp.obj
[ 52%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfIdentityEncoding.cpp.obj
[ 53%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfImage.cpp.obj
C:\podofo-0.9.1\src\doc\PdfImage.cpp: In member function 'void PoDoFo::PdfImage::LoadFromJpegHandle(PoDoFo::PdfFileInputStream*)':
C:\podofo-0.9.1\src\doc\PdfImage.cpp:280: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfImage.cpp: In member function 'void PoDoFo::PdfImage::LoadFromPng(const char*)':
C:\podofo-0.9.1\src\doc\PdfImage.cpp:593: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfImage.cpp:593: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfImage.cpp:600: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfImage.cpp:668: warning: use of old-style cast
C:\podofo-0.9.1\src\doc\PdfImage.cpp:677: warning: comparison between signed and unsigned integer expressions
C:\podofo-0.9.1\src\doc\PdfImage.cpp:723: warning: use of old-style cast
[ 54%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfInfo.cpp.obj
[ 55%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfMemDocument.cpp.obj
[ 55%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfNamesTree.cpp.obj
[ 56%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfOutlines.cpp.obj
[ 57%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfPage.cpp.obj
[ 58%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfPagesTreeCache.cpp.obj
[ 58%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfPagesTree.cpp.obj
[ 59%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfPainter.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfPainterMM.cpp.obj
[ 61%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfShadingPattern.cpp.obj
[ 61%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfSignatureField.cpp.obj
[ 62%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfSignOutputDevice.cpp.obj
[ 63%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfStreamedDocument.cpp.obj
[ 64%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfTable.cpp.obj
[ 64%] Building CXX object src/CMakeFiles/podofo_static.dir/doc/PdfXObject.cpp.obj
[ 65%] Building RC object src/CMakeFiles/podofo_static.dir/doc/podofo-doc.rc.obj
In file included from C:\podofo-0.9.1\src/base/PdfDefines.h:31,
                 from C:\podofo-0.9.1\src\doc\podofo-doc.rc:2:
C:\podofo-0.9.1\src/base/PdfCompilerCompat.h:37:21: error: cstddef: No such file or directory
In file included from C:\podofo-0.9.1\src\doc\podofo-doc.rc:2:
C:\podofo-0.9.1\src/base/PdfDefines.h:59:15: error: map: No such file or directory
C:\podofo-0.9.1\src/base/PdfDefines.h:60:18: error: string: No such file or directory
C:\podofo-0.9.1\src/base/PdfDefines.h:61:18: error: vector: No such file or directory
C:\podofo-0.9.1\src/base/PdfDefines.h:62:15: error: set: No such file or directory
In file included from C:\podofo-0.9.1\src/base/PdfDefines.h:101,
                 from C:\podofo-0.9.1\src\doc\podofo-doc.rc:2:
C:\podofo-0.9.1\src/base/PdfError.h:29:17: error: queue: No such file or directory
C:\podofo-0.9.1\src/base/PdfError.h:30:19: error: cstdarg: No such file or directory
C:\CodeBlocks\MinGW\bin\windres.exe: C:\\podofo-0.9.1\\src\\doc\\podofo-doc.rc:49: syntax error
C:\CodeBlocks\MinGW\bin\windres.exe: preprocessing failed.
mingw32-make[4]: *** [src/CMakeFiles/podofo_static.dir/doc/podofo-doc.rc.obj] Error 1
mingw32-make[3]: *** [src/CMakeFiles/podofo_static.dir/all] Error 2
mingw32-make[2]: *** [all] Error 2

Open the top-level "CMakeLists.txt" file. Find the line with the command INCLUDE_DIRECTORIES. And add to that list whatever additional directories required to find those header files, between quotation marks.

Thanks again for coming back on this. I've solved the issue now.
This question was related to installing PODOFO, and it seems that all my issues with building podofo came down to the CMAKE version I was using to generate the Makefile. I downgrated to CMAKE 2.8.3 and it finally compiled. It's taken months to get to that point.

The missing refence to C:\CodeBlocks\MinGW\lib\gcc\mingw32\4.4.1\include\c++ is due to some bug in CMAKE in later versions (later than 2.8.3). I was using 2.8.9 on WinXP with a MinGW compiler 4.4.1, and was getting this error.

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.