Hi!
I am trying to use the c++ library called Diffpack. The library is only compatible with vsc6.0. When trying to compile any of the supplied applications in vsc++6. I get the following errors:
spacetimescale.h(187) : error C2143: syntax error : missing ';' before '*'
spacetimescale.h(187) : error C2501: 'Vec_NUMT' : missing storage-class or type specifiers
spacetimescale.h(187) : error C2501: 'a_parameter' : missing storage-class or type
Here is some code sample from the file
class ScalarScale : public HandleId
//-----------------------------------------------------------------------------
{
Vec(NUMT)* a_parameter; // array to be scaled
NUMT* n_parameter; // number variable to be scaled
Ptv(NUMT)* p_parameter; // point vector to be scaled
// only a_parameter, n_parameter _or_ p_parameter can be used
// two of them must be NULL, the one that is not NULL is the one to be used
// the settings of a_parameter, n_parameter etc is performed in the
// attach functions
public:
String quantity_name; // name of scalar quantity to be scaled
NUMT scale_factor; // scaled_value = factor * (old_value - reference)
NUMT scale_reference;
bool is_scaled; // indicator reflecting calls to scale/unscale
ScalarScale (const char* quantity_name = NULL);
~ScalarScale ();
Another strange thing is that the header files that are in the same directory as the application is includede with <>, not " ". So I have to manually change this.
Some sample code from wawe1.cpp:
#include <ElmMatVec.h>
#include <readOrMakeGrid.h>
#include <SparseDS.h>
#include "Wave0.h"
Wave0:: Wave0 () {}
Wave0::~Wave0 () {}
void Wave0:: adm (MenuSystem& menu)
{
SimCase::attach (menu);
define (menu); menu.prompt(); scan();
}
void Wave0:: define (MenuSystem& menu, int level)
{
menu.addItem (level, "time parameters", "TimePrm::scan syntax",
"dt=0.05, t in [0,0.9]");
menu.addItem (level, "gridfile",
"filename or P=Prepro.../geometry/partition",
"P=PreproBox | d=1 [0,1] | d=1 elm_tp=ElmTensorProd1 "
"div=[10], grading=[1]");
menu.addItem (level, "wave velocity", "c", "1.0");
menu.addItem (level, "sigma",
"steepness parameter in initial condition", "1000.0");
SaveSimRes:: defineStatic (menu, level+1);
FEM:: defineStatic (menu, level+1);
}
Any help is appreciated

syntax error : missing ';' before '*' compile error using diffpack library with vsc++6.0
Kdean6869
unless Vec is a macro this code is not like any C or C++ I have ever seen so your problem may lie here.
ny3ranger
Thank you!!!
What does it do when it preprocess
Both main.cpp and wave0.cpp then compiled successfully, however when trying to build the exe file I get the following errror:
Compiling...
Wave0.cpp
main.cpp
Linking...
LINK : fatal error LNK1104: cannot open file "kernel32.lib"
Error executing link.exe.
Wave0.exe - 1 error(s), 0 warning(s)
fatcat1111
Damian
tarania
Problem solved!!
Thank you again! You have been very helpful. I had to manually add libraries in VC6. I also did a very big mistake: not opening the project file, just the cpp and header files.
ArtRI