Installation order of Math.h++ and Tools.h++ is critical

Article ID: 772
Last updated: 29 Jan, 2008
Article ID: 772
Last updated: 29 Jan, 2008
Revision: 1
Views: 4308
Posted: 27 Jun, 1997
by --
Updated: 29 Jan, 2008
by
Problem


For versions of Math.h++ prior to version 6.1.1 the installation order of Math.h++ and Tools.h++ is critical. This has been fixed in version 6.1.1 of Math.h++. Failure to do so in older versions of Math.h++ can result in errors such as:
>coreerr.cpp, line 67: Error: RWCORE_EOF(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 68: Error: RWCORE_GENERIC(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 69: Error: RWCORE_INVADDR(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 70: Error: RWCORE_LOCK(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 71: Error: RWCORE_NOINIT(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 72: Error: RWCORE_NOMEM(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 73: Error: RWCORE_OPERR(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 74: Error: RWCORE_OUTALLOC(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 75: Error: RWCORE_OVFLOW(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 76: Error: RWCORE_STREAM(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> coreerr.cpp, line 77: Error: RWCORE_SYNSTREAM(), returning const RWCatMsg* const , was previously declared returning const RWCatMsg*.
> 11 Error(s) detected.
> *** Error code 11
> make: Fatal error: Command failed for target `coreerr.o'



Cause


Math.h++ can be purchased as a stand alone product without buying Tools.h++. However, Math.h++ does uses some classes from Tools.h++. This is possible because Math.h++ includes a very small subset of the files that come with Tools.h++. This is desirable for people using only Math.h++. Those using Tools.h++ with Math.h++ will face a dilemma because they share common header and source files. The common files in question that are part of the mathsrc directory are shown below:

 

   bstream.obj   coreerr.obj   mempool.obj   message.obj   pstream.obj
   ref.obj       rwerr.obj     rwfile.obj    utility.obj   vstream.obj
The header files corresponding to these source files are located in the rw directory.

If you are using Tools.h++ in conjunction with Math.h++, the question then becomes what is the version of the Tools.h++ files that came with Math.h++?

Math.h++ 5.1.3 comes with some Tools.h++ 6.1.0 files.
Math.h++ 5.2.0 comes with some Tools.h++ 7.0.1 files.
Math.h++ 6.0.0 comes with some Tools.h++ 7.0.1 files.
Math.h++ 6.1.0 comes with some Tools.h++ 7.0.1 files.

So how should Tools.h++ and Math.h++ be integrated together?


Action


The process of making sure Math.h++ works with Tools.h++ has two steps.

 

  1. You must make sure the Tools.h++ header files in the rogue/rw directory are 100 percent consistent with your Tools.h++ installation by making sure you installed Tools.h++ AFTER Math.h++. If you have already installed Math.h++ on top of Tools.h++, you need to reinstall Tools.h++.
  2. You must make sure you do not include the Tools.h++ source files that come with Math.h++ in the rogue/mathsrc directory in your Math.h++ library. To do this you must remove all references to the files listed above to the rogue/mathsrc makefile.
    • For the PC this can be done like this:
      # Tools.h++ objects
      #OBJ12 =    bstream.obj   coreerr.obj   mempool.obj   message.obj   pstream.obj
      #OBJ13 =    ref.obj       rwerr.obj     rwfile.obj    utility.obj   vstream.obj
      
    • For UNIX this can be done like this:
      #TOOLSOBJS= bstream.o   coreerr.o   mempool.o   message.o   pstream.o  #           ref.o       rwerr.o     rwfile.o    utility.o   vstream.o
      
  3. Since you have removed the object files listed above from the Math.h++ library, you must effectively replace them by linking in the the Tools.h++ library when building an executable.
        CC -o myapp .... -lrwmth -lrwtool
    

     

  4. Now recompile your Math.h++ and Tools.h++ libraries and rerun the examples.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 772
Last updated: 29 Jan, 2008
Revision: 1
Views: 4308
Posted: 27 Jun, 1997 by --
Updated: 29 Jan, 2008 by

Others in this category