GeorgKindermann / g4m

Global forest model (g4m)
GNU General Public License v3.0
4 stars 8 forks source link

Missing file ./dima/dima.cpp #1

Closed vwmaus closed 7 years ago

vwmaus commented 7 years ago

I cannot compile the model. The file ./dima/dima.cpp is missing.

g++ forest.cpp -O2 -Wall -oforest
In file included from forest.cpp:21:0:
forestCalculations.cpp:5:27: fatal error: ./dima/dima.cpp: No such file or directory
 #include "./dima/dima.cpp"
                           ^
compilation terminated.
Makefile:2: recipe for target 'g4m' failed
make: *** [g4m] Error 1

Thanks!

GeorgKindermann commented 7 years ago

Removed the DIMA include. Hope it can now be compiled.

vwmaus commented 7 years ago

thanks @GeorgKindermann. There is still some functions missing forVal, agrVal, and make_pair

forestCalculations.cpp:119:59: error: ‘forVal’ was not declared in this scope
   double fval = forVal(compr,rotInter,priceTimber,forValNC);
... 
forestCalculations.cpp:124:35: error: ‘agrVal’ was not declared in this scope
     aval = coeffAgr * agrVal(compr) * (1 - minForest);  // with interaction
...
misc.h:35:26: error: ‘make_pair’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
     aMap.insert(make_pair(i, v));
GeorgKindermann commented 7 years ago

Ups. Hope it works now with this Dima and with the included for make_pair. Georg

vwmaus commented 7 years ago

forVal and agrVal are found now, but it still does not find make_pair

vwmaus commented 7 years ago
misc.h:28:26: error: ‘make_pair’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
     aMap.insert(make_pair(i, v));
GeorgKindermann commented 7 years ago

std:: was missing. Now it should find it. (Sorry. Currently I have no compiler and could try the changes by myself...) Georg

vwmaus commented 7 years ago

Great! All fine now, I just figured that problem out in this link http://opensuse-packaging.opensuse.narkive.com/F4X8bo3m/gcc-4-7-and-diclaration

It seems related to the gcc version!

Many thanks!