Solved

code not compiling

Posted on 2004-08-09
17
539 Views
Last Modified: 2012-08-14
Hello
I am using Dev-c++ under windows 2000 and trying to run this simple code but it is giving errors as below.
Tools.h is a header file that came with a "Tools library" I downloaded from the web and built it using GNU make under Cygwin with "make clean; make"

thanks

**the code

#include <iostream>
#include "Tools.h"
using namespace std;

int main()
{
cout << "keep on going " << endl;
cin.sync(); getchar(); return 0;
return 0;
}


**the errors

Compiler: Default compiler
Building Makefile: "C:\IBMDRV\C++\work\proj1\Makefile.win"
Finding dependencies for file: C:\IBMDRV\C++\work\proj1\main.cpp
Executing make...
make.exe -f "C:\IBMDRV\C++\work\proj1\Makefile.win" all
C:\IBMDRV\C++\work\proj1\Makefile.win:28: *** multiple target patterns. Stop.
Execution terminated
0
Comment
Question by:samj
17 Comments
 

Author Comment

by:samj
Comment Utility
point increase for extra effort to solve a another error when I add the line
#include "SpatialIndex.h"
to my project in my last post.
the library is a free download from
http://www.cs.ucr.edu/~marioh/spatialindex/
I need to include the library for use in my project but it is not building and giving the errors as indicated

thanks
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
This is not an error in the code but something wrong with your makefiles. Check the makefile tab in the project settings and remove any extra makefile. Also can you post you makefile.win file?
0
 

Author Comment

by:samj
Comment Utility
the make file is the default in the directory of the project, no special Makefile is selected in the Makefile option of my IDE.
here is the Makefile.win

# Project: Project1
# Makefile created by Dev-C++ 4.9.9.0

CPP  = g++.exe -D__DEBUG__
CC   = gcc.exe -D__DEBUG__
WINDRES = windres.exe
RES  =
OBJ  = main.o $(RES)
LINKOBJ  = main.o $(RES)
LIBS =  -L"C:/Dev-Cpp/lib" ../../SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/libspatialindex.a  -lgmon -pg  -g3
INCS =  -I"C:/Dev-Cpp/include"  -I"C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib"
CXXINCS =  -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib"
BIN  = Project1.exe
CXXFLAGS = $(CXXINCS)   -pg -g3
CFLAGS = $(INCS)   -pg -g3

.PHONY: all all-before all-after clean clean-custom

all: all-before Project1.exe all-after


clean: clean-custom
      rm -f $(OBJ) $(BIN)

$(BIN): $(OBJ)
      $(CPP) $(LINKOBJ) -o "Project1.exe" $(LIBS)

main.o: main.cpp C:/Dev-Cpp/include/c++/iostream   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h   C:/Dev-Cpp/include/c++/vector C:/Dev-Cpp/include/c++/map   C:/Dev-Cpp/include/c++/stack C:/Dev-Cpp/include/c++/queue   C:/Dev-Cpp/include/c++/set C:/Dev-Cpp/include/c++/sstream   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/TimePoint.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/TimeRegion.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/MovingPoint.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/MovingRegion.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/RTree.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/MVRTree.h   C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/TPRTree.hIn file included from main.cpp:2:
      $(CPP) -c main.cpp -o main.o $(CXXFLAGS)
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
It seems that idented lines have blanks on the left rather than a tab character.
Make sure that the line just below "clean:" starting with "rm" and the 2 lines beginning with "$(CPP)" starts with a TAB char (ascii 9) and not blanks. Also do you have any idea how this could happen?
0
 

Author Comment

by:samj
Comment Utility
I just made sure of that, the 3 lines mensioned in your post are starting with a tab and not a space, since I am using Dev-c++ I did "Rebuild all" and this error is what I get now.

Compiler: Default compiler
Building Makefile: "C:\IBMDRV\C++\work\proj1\Makefile.win"
Executing  make clean
rm -f main.o  Project1.exe

g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib"    -lspatialindex -pg -g3

In file included from main.cpp:2:
C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:45:19: Tools.h: No such file or directory
In file included from main.cpp:2:
C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:47: parse
   error before `::' token

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:51: parse
   error before `;' token

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:52: parse
   error before `;' token

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:64: `
   Tools' is not a class or namespace

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:65: `
   IObject' is not a class or namespace

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: `
   IShape' was not declared in this scope

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: `
   out' was not declared in this scope

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: parse
   error before `)' token

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: `
   void' fails to be a typedef or built in type

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: ISO
   C++ forbids declaration of `getShape' with no type

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:68: virtual
   outside class declaration

C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:69: confused by earlier errors, bailing out

make.exe: *** [main.o] Error 1

Execution terminated
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
Ok so the makefile problem (the one of your original question) is solved.
Now you have several errors in file SpatialIndex.h (which doen't seem part of the Spatial Index Library by the way)
Since this doesn't appear in you original source file, I assume you have added the #include line mentioned in your second post.
One of the problem is that files Tools.h is not found in any of the include directories. Add the directory where you have placed tools.h in the list of include list for C++ and this should solve most of the issues.
 
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
Comment Utility
>> Tools.h: No such file or directory

There is a RogueWave header file named Tools.h. If you need to include that header you have to add the RogueWave include directory either to INCLUDE environment variable or to your project include directories (there should be another -I option in the makefile).

The errors of SpatialIndex.h could come because of using old iostream header files. Then there might be a mismatch between your

  #include <iostream>

- that is a new iostream header - and any

  #include <iostream.h>

in spatialindex.h.

If so, you have to use old header files also - if you couldn't get a version using C++ standard headers.

If spatialindex.h already uses new iostream header files, the errors above could occur because of a wrong order or a missing
 
    using namespace std;

statement. You coud try to add that statement below

  #include <iostream>

or if that doesn't help to remove

  #include <iostream>

from your cpp files.

Regards, Alex
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
The Tools.h that is not found is not the one from RogueWave, but the one from the SpatialIndex Lib (tools/lib subdir) , so don't go and look for RogueWave stuff (which is proprietary by the way).

If you still have problems after solving the "Tools.h not found" issue, please post the SpatialIndex.h file.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:samj
Comment Utility
#include <iostream>
#include <SpatialIndex.h> //not "Sp..h" as instructed by the library author
using namespace std;
int main()
{
   
    cout << "keep on going " << endl;
cin.sync(); getchar(); return 0;
return 0;
}
/////////////////////error//////////////////////
Compiler: Default compiler
Building Makefile: "C:\IBMDRV\C++\work\proj1\Makefile.win"
Executing  make clean
rm -f main.o  Project1.exe

g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include/c++/mingw32"  -I"C:/Dev-Cpp/include/c++/backward"  -I"C:/Dev-Cpp/include"  -I"C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib"  -I"C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/tools/lib"    -lspatialindex -pg -g3

In file included from C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:45,
                 from main.cpp:2:
C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/tools/lib/Tools.h:45:26: sys/resource.h: No such file or directory
C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/tools/lib/Tools.h:60:1: warning: "interface" redefined
In file included from C:/Dev-Cpp/include/rpcdce.h:10,
                 from C:/Dev-Cpp/include/rpc.h:34,
                 from C:/Dev-Cpp/include/windows.h:82,
                 from C:/Dev-Cpp/include/c++/mingw32/bits/gthr-default.h:462,
                 from C:/Dev-Cpp/include/c++/mingw32/bits/gthr.h:98,
                 from C:/Dev-Cpp/include/c++/mingw32/bits/c++io.h:37,
                 from C:/Dev-Cpp/include/c++/bits/fpos.h:44,
                 from C:/Dev-Cpp/include/c++/iosfwd:46,

                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,

                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/basetyps.h:25:1: warning: this is the location of the previous definition
In file included from C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/spatialindex/lib/SpatialIndex.h:45,
                 from main.cpp:2:
C:/IBMDRV/C++/SpatialSearch/spatialindex.081b/spatialindex.081b/tools/lib/Tools.h:427: field
   `m_tmpRU' has incomplete type

make.exe: *** [main.o] Error 1

Execution terminated
///////////////////////////////SpatialIndex.h//////////////////////
#ifndef __spatialindex_h
#define __spatialindex_h

#include <assert.h>
#include <iostream>
#include <vector>
#include <map>
#include <limits>
#include <stack>
#include <queue>
#include <set>
#include <cmath>
#include <string>
#include <sstream>

#include <Tools.h>

using namespace Tools::Geometry;

namespace SpatialIndex
{
      const std::string VERSION;
      const std::string DATE;

      enum CommandType
      {
            CT_NODEREAD = 0x0,
            CT_NODEDELETE,
            CT_NODEWRITE
      };

      //
      // Interfaces
      //
      interface IEntry : public Tools::IObject
      {
      public:
            virtual long getIdentifier() const = 0;
            virtual void getShape(IShape** out) const throw (std::exception) = 0;
            virtual ~IEntry() {}
      }; // IEntry

      interface INode : public IEntry, public Tools::ISerializable
      {
      public:
            virtual unsigned long getChildrenCount() const = 0;
            virtual long getChildIdentifier(unsigned long index) const throw (Tools::IndexOutOfBoundsException) = 0;
            virtual void getChildShape(unsigned long index, IShape** out) const throw (Tools::IndexOutOfBoundsException, std::exception) = 0;
            virtual unsigned long getLevel() const = 0;
            virtual bool isIndex() const = 0;
            virtual bool isLeaf() const = 0;
            virtual ~INode() {}
      }; // INode

      interface IData : public IEntry
      {
      public:
            virtual void getData(unsigned long& len, byte** data) const = 0;
            virtual ~IData() {}
      }; // IData

      interface IDataStream : public Tools::IObjectStream
      {
      public:
            virtual IData* getNext() = 0;
            virtual ~IDataStream() {}
      }; // IDataStream

      interface ICommand
      {
      public:
            virtual void execute(const INode& in) = 0;
            virtual ~ICommand() {}
      }; // ICommand

      interface INearestNeighborComparator
      {
      public:
            virtual double getMinimumDistance(const IShape& query, const IShape& entry) = 0;
            virtual double getMinimumDistance(const IShape& query, const IData& data) = 0;
            virtual ~INearestNeighborComparator() {}
      }; // INearestNeighborComparator

      interface IStorageManager
      {
      public:
            virtual void loadByteArray(const long id, unsigned long& len, byte** data) = 0;
            virtual void storeByteArray(long& id, const unsigned long len, const byte* const data) = 0;
            virtual void deleteByteArray(const long id) = 0;
            virtual ~IStorageManager() {}
      }; // IStorageManager

      interface IVisitor
      {
      public:
            virtual void visitNode(const INode& in) = 0;
            virtual void visitData(const IData& in) = 0;
            virtual void visitData(std::vector<const IData*>& v) = 0;
            virtual ~IVisitor() {}
      }; // IVisitor

      interface IQueryStrategy
      {
      public:
            virtual void getNextEntry(const IEntry& previouslyFetched, long& nextEntryToFetch, bool& bFetchNextEntry) = 0;
            virtual ~IQueryStrategy() {}
      }; // IQueryStrategy

      interface IStatistics
      {
      public:
            virtual unsigned long getReads() const = 0;
            virtual unsigned long getWrites() const = 0;
            virtual unsigned long getNumberOfNodes() const = 0;
            virtual unsigned long getNumberOfData() const = 0;
            virtual ~IStatistics() {}
      }; // IStatistics

      interface ISpatialIndex
      {
      public:
            virtual void insertData(unsigned long len, const byte* pData, const IShape& shape, long shapeIdentifier) throw (Tools::Exception, std::exception) = 0;
            virtual bool deleteData(const IShape& shape, long shapeIdentifier) throw (Tools::Exception, std::exception) = 0;
            virtual void containsWhatQuery(const IShape& query, IVisitor& v) throw (Tools::Exception, std::exception) = 0;
            virtual void intersectsWithQuery(const IShape& query, IVisitor& v) throw (Tools::Exception, std::exception) = 0;
            virtual void pointLocationQuery(const Tools::Geometry::Point& query, IVisitor& v) throw (Tools::Exception, std::exception) = 0;
            virtual void nearestNeighborQuery(long k, const IShape& query, IVisitor& v, INearestNeighborComparator& nnc) throw (Tools::Exception, std::exception) = 0;
            virtual void nearestNeighborQuery(long k, const IShape& query, IVisitor& v) throw (Tools::Exception, std::exception) = 0;
            virtual void selfJoinQuery(const IShape& s, IVisitor& v) throw (Tools::Exception, std::exception) = 0;
            virtual void queryStrategy(IQueryStrategy& qs) throw (Tools::Exception, std::exception) = 0;
            virtual void getIndexProperties(Tools::PropertySet& out) const = 0;
            virtual void addCommand(ICommand* in, CommandType ct) = 0;
            virtual bool isIndexValid() throw (Tools::Exception, std::exception) = 0;
            virtual void getStatistics(IStatistics** out) const throw (std::exception) = 0;
            virtual ~ISpatialIndex() {}
      }; // ISpatialIndex

      namespace StorageManager
      {
            enum StorageManagerConstants
            {
                  EmptyPage = -0x1,
                  NewPage = -0x1
            };

            interface IBuffer : public IStorageManager
            {
            public:
                  virtual unsigned long getHits() = 0;
                  virtual void clear() = 0;
                  virtual ~IBuffer() {}
            }; // IBuffer

            extern IStorageManager* returnMemoryStorageManager(Tools::PropertySet& in)
                  throw (std::exception, Tools::Exception);
            extern IStorageManager* createNewMemoryStorageManager()
                  throw (std::exception, Tools::Exception);

            extern IStorageManager* returnDiskStorageManager(Tools::PropertySet& in)
                  throw (std::exception, Tools::Exception);
            extern IStorageManager* createNewDiskStorageManager(std::string& baseName, unsigned long pageSize)
                  throw (std::exception, Tools::Exception);
            extern IStorageManager* loadDiskStorageManager(std::string& baseName)
                  throw (std::exception, Tools::Exception);

            extern IBuffer* returnRandomEvictionsBuffer(IStorageManager& in, Tools::PropertySet& in)
                  throw (std::exception, Tools::Exception);
            extern IBuffer* createNewRandomEvictionsBuffer(IStorageManager& in, unsigned int capacity, bool bWriteThrough)
                  throw (std::exception, Tools::Exception);
      }

      //
      // Global functions
      //
      extern std::ostream& operator<<(std::ostream&, const ISpatialIndex&);
      extern std::ostream& operator<<(std::ostream&, const IStatistics&);
}

#include "TimePoint.h"
#include "TimeRegion.h"
#include "MovingPoint.h"
#include "MovingRegion.h"
#include "RTree.h"
#include "MVRTree.h"
#include "TPRTree.h"

#endif /*__spatialindex_h*/
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
The problem now is that tools.h tries to include sys/resource which is standard under unix/cygwin but not under the window environment and your dev-c++ is using the mingw compiler which assumes a windows environment.
You have these options:
- compile with cygwin instead of mingw
- contact the author and ask his help to remove this dependency and make his code portable to windows
- try to remove this dependency yourself (remove the inclusion of this header and see what other errors you get, then try to fix them)

0
 

Author Comment

by:samj
Comment Utility
ok, now I am setting up my linux debian box, and will try this on woody unstable which has kdevelop and gcc 3.4.x and will report back.
0
 

Author Comment

by:samj
Comment Utility
good, finaly I have linux set and got all files in the right directories, build the program in kdevelop3.0.4, using GNU make and g++ 3.3.4

the inclusion for the linker as follows
-L/home/sam/C++/SpatialIndexing/spatialindex/lib/ -I/home/sam/C++/SpatialIndexing/spatialindex/lib/
-lspatialindex

sam@debian:~/C++/SpatialIndexing/spatialindex/lib$ tree
.
|-- MVRTree.h
|-- MovingPoint.h
|-- MovingRegion.h
|-- RTree.h
|-- SpatialIndex.h
|-- TPRTree.h
|-- TimePoint.h
|-- TimeRegion.h
`-- libspatialindex.a

//////////////////////////////////////////////////////////
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream>
#include "SpatialIndex.h" //with out this line it compiles good but fails with it, error below

using namespace std;

int main()
{
    cout << "keep on going " << endl;
   
}
////////////////////////////////////////////////////////////////
/////////////////////////ERROR//////////////////////////
cd "/home/sam/proj/debug" && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" make -k  
*compiling proj.cpp (g++)
*/home/sam/proj/src/Tools.h:23:26: SmartPointer.h: No such file or directory
*/home/sam/proj/src/Tools.h:24:25: PointerPool.h: No such file or directory
*/home/sam/proj/src/Tools.h:25:25: PoolPointer.h: No such file or directory
*/home/sam/proj/src/Tools.h:35: error: parse error before string constant
*/home/sam/proj/src/Tools.h:455:19: Point.h: No such file or directory
*/home/sam/proj/src/Tools.h:456:20: Region.h: No such file or directory
*/home/sam/proj/src/Tools.h:457:27: TemporaryFile.h: No such file or directory
*/home/sam/proj/src/SpatialIndex.h:51: error: parse error before string constant
*/home/sam/proj/src/TimePoint.h:36: error: base class `Tools::Geometry::Point' has incomplete type
*/home/sam/proj/src/TimeRegion.h:36: error: base class `Tools::Geometry::Region' has incomplete type
*/home/sam/proj/src/RTree.h:76: error: field `m_region' has incomplete type
*/home/sam/proj/src/MVRTree.h:57: error: cannot declare field ` SpatialIndex::MVRTree::Data::m_region' to be of type ` SpatialIndex::TimeRegion'
*/home/sam/proj/src/MVRTree.h:57: error: because the following virtual functions are abstract:
*/home/sam/proj/src/Tools.h:245: error: virtual bool Tools::Geometry::IShape::intersectsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:246: error: virtual bool Tools::Geometry::IShape::containsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:247: error: virtual bool Tools::Geometry::IShape::touchesShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:248: error: virtual void Tools::Geometry::IShape::getCenter(Tools::Geometry::Point&) const
*/home/sam/proj/src/Tools.h:249: error: virtual long unsigned int Tools::Geometry::IShape::getDimension() const
*/home/sam/proj/src/Tools.h:250: error: virtual void Tools::Geometry::IShape::getMBR(Tools::Geometry::Region&) const
*/home/sam/proj/src/Tools.h:251: error: virtual double Tools::Geometry::IShape::getArea() const
*/home/sam/proj/src/Tools.h:252: error: virtual double Tools::Geometry::IShape::getMinimumDistance(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/TPRTree.h:55: error: cannot declare field ` SpatialIndex::TPRTree::Data::m_region' to be of type ` SpatialIndex::MovingRegion'
*/home/sam/proj/src/TPRTree.h:55: error: because the following virtual functions are abstract:
*/home/sam/proj/src/Tools.h:245: error: virtual bool Tools::Geometry::IShape::intersectsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:246: error: virtual bool Tools::Geometry::IShape::containsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:247: error: virtual bool Tools::Geometry::IShape::touchesShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:248: error: virtual void Tools::Geometry::IShape::getCenter(Tools::Geometry::Point&) const
*/home/sam/proj/src/Tools.h:249: error: virtual long unsigned int Tools::Geometry::IShape::getDimension() const
*/home/sam/proj/src/Tools.h:250: error: virtual void Tools::Geometry::IShape::getMBR(Tools::Geometry::Region&) const
*/home/sam/proj/src/Tools.h:251: error: virtual double Tools::Geometry::IShape::getArea() const
*/home/sam/proj/src/Tools.h:252: error: virtual double Tools::Geometry::IShape::getMinimumDistance(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:245: error: virtual bool Tools::Geometry::IShape::intersectsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:246: error: virtual bool Tools::Geometry::IShape::containsShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:247: error: virtual bool Tools::Geometry::IShape::touchesShape(const Tools::Geometry::IShape&) const
*/home/sam/proj/src/Tools.h:248: error: virtual void Tools::Geometry::IShape::getCenter(Tools::Geometry::Point&) const
*/home/sam/proj/src/Tools.h:249: error: virtual long unsigned int Tools::Geometry::IShape::getDimension() const
*/home/sam/proj/src/Tools.h:250: error: virtual void Tools::Geometry::IShape::getMBR(Tools::Geometry::Region&) const
*/home/sam/proj/src/Tools.h:251: error: virtual double Tools::Geometry::IShape::getArea() const
*/home/sam/proj/src/Tools.h:252: error: virtual double Tools::Geometry::IShape::getMinimumDistance(const Tools::Geometry::IShape&) const
//////////////////////////////////////////////////////////////////////////////////////////////
0
 
LVL 11

Expert Comment

by:lbertacco
Comment Utility
The gcc compiler can't find some of the include files. Either you are missing those file or they are not present in the directory you have specified with option -I

Check where you have the files:
SmartPointer.h, PoolPointer.h, etc.
and add them in the include dir list

These file are present in the spatialindex distribution archive under directory tools/lib, so you should have them somewhere but not in the directory ~/C++/SpatialIndexing/spatialindex/lib (at least nor form the directory listing of your last message). So find where they are and add that path to the include dirs.

0
 

Author Comment

by:samj
Comment Utility
it has been a hard time for me trying to get kdevelop to compile the code, the lack of docs and HowTos is making it even harder, read as much as I can, asked Qs in Kdevelops forum for no avail, it seams even building a simple library is a task without knowing how the IDE work. the same with Anjuta.
any suggestions, I just finished trying with anjuta and I cann't even get their hello world template to compile, as much as I love to stick to Anjuta, I find it easier to go back to kdevelop because I am getting get some kind of response to Qs vs. Anjuta forum.

I know you experts use vim | emacs but that is hard for me now without much studing how to use them as an IDE then learn howTo use all those tools to compile a C++ prog.
so I am stuck between the rock and the hard place. and the easier of the two seams to be kdevelp right now since I was able to compile some simple progs and get some output.


0
 

Author Comment

by:samj
Comment Utility
it looks like I need to learn the "gnu build system" in-order to solve this problem. I built some simple programs "hello world" but when it comes to "Deep" directory setup, with libs and all, I am not able yet to come up with the correct makefile/configure .am files.
however the original question has not found a solution till I could run it on linux as suggested.
I am having some truble figuring out the directory structure on how to set this program up and thus come up with the correct makefile.am and configure.am, I would appricate some help in this direction if the experts think this is the way to go.

thanks
0
 

Accepted Solution

by:
PashaMod earned 0 total points
Comment Utility
Closed, 325 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now