Dear all,
I'm struggling with a make file error which is as follows:
g++ -I/sw/include -I/LPX/utils -c -o lpjio.o lpjio.cpp
lpjio.cpp: In function int outannual_(int*, int*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*):
lpjio.cpp:1168: error: cannot convert float to float* for argument 2 to void handle_output_record(std::string, float*)
lpjio.cpp:1178: error: cannot convert float** to float* for argument 2 to void handle_output_record(std::string, float*)
make: *** [lpjio.o] Error 1
The code that it refers to (as far as I can tell) is as follows:
And the handle_output_record (in the same file, lpjio.cpp) that it mentions is as follows:
Am I overlooking something simple?! Or is this likely to be a complex task to solve?
Either way, I'd be grateful for any help or advice offered. Any further details required, please let me know and I'll try my best to provide them.
Many thanks,
Steve
I'm struggling with a make file error which is as follows:
g++ -I/sw/include -I/LPX/utils -c -o lpjio.o lpjio.cpp
lpjio.cpp: In function int outannual_(int*, int*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*):
lpjio.cpp:1168: error: cannot convert float to float* for argument 2 to void handle_output_record(std::string, float*)
lpjio.cpp:1178: error: cannot convert float** to float* for argument 2 to void handle_output_record(std::string, float*)
make: *** [lpjio.o] Error 1
The code that it refers to (as far as I can tell) is as follows:
Code:
extern "C" int outannual_(int *year, int *present,
float *nind,
float *lm_ind, float *rm_ind,
float *sm_ind, float *hm_ind,
float *fpc_grid,
float *anpp, float *acflux_estab,
float *litter_ag, float *litter_bg,
float *cpool_fast, float *cpool_slow,
float *arh, float *afire_frac, float *acflux_fire,
float *mcflux_fire,
float *arunoff, float *sla, float *mpar,
float *mapar, float *xmphen, float *anpp_add,
float *mnpp, float *mrunoff, float *aaet,
float *mrh, float *mnpp_add, float *maet,
float *xmgpp, float *mtemp_soil, float *xmcica,
float *xmlresp, float *xmsresp, float *xmrresp,
float *xmgresp, float *xmaresp,
float *mauw1, float *mauw2,
float *maep, float *aaep,
float *mpet_grid, float *apet_grid,
float *mintc, float *aintc,
float *xmeangc, float *xmgp,
float *num_fire, float *annum_fire,
float *area_burnt, float *an_areafires,
float *mfdi, float *an_fdi, float *an_fseason,
float *acflux_trace, float *xmcflux_trace,
float *m_fc_crown, float *an_fc_crown,
float *m_i_surface, float *an_i_surface,
float *gdd, float *height, float *mgpp,
float *wu, float *wl, float *dphen)
#else
extern "C" int outannual_(int *year, int *present,
float *nind,
float *lm_ind, float *rm_ind,
float *sm_ind, float *hm_ind,
float *vegc, float *fpc_grid,
float *anpp, float *acflux_estab,
float *litter_ag, float *litter_bg,
float *cpool_fast, float *cpool_slow,
float *arh, float *afire_frac, float *acflux_fire,
float *arunoff, float *sla, float *mpar,
float *mapar, float *xmphen, float *anpp_add,
float *mnpp, float *mrunoff, float *aaet,
float *mrh, float *mnpp_add, float *maet,
float *xmgpp, float *mtemp_soil, float *xmcica,
float *xmlresp, float *xmsresp, float *xmrresp,
float *xmgresp, float *xmaresp,
float *mw1, float *mw2,
float *maep, float *aaep,
float *mintc, float *aintc,
float *gdd, float *height, float *mgpp,
float *wu, float *wl, float *dphen,
float *lresp, float *sresp, float *rresp,
float *gresp,
float *mpet, float *arunoff_drain,
float *arunoff_surf, float *mrunoff_drain,
float *mrunoff_surf, float *apet, float *mprecip,
float *aprec, float *lai_ind, float *total_anpp)
And the handle_output_record (in the same file, lpjio.cpp) that it mentions is as follows:
Code:
handle_output_record("nind", nind);
handle_output_record("lm_ind", lm_ind);
handle_output_record("rm_ind", sm_ind);
handle_output_record("sm_ind", hm_ind);
handle_output_record("hm_ind", rm_ind);
handle_output_record("vegc", vegc);
handle_output_record("fpc_grid", fpc_grid);
handle_output_record("anpp", anpp);
handle_output_record("acflux_estab", acflux_estab);
handle_output_record("litter_ag", litter_ag);
handle_output_record("litter_bg", litter_bg);
handle_output_record("cpool_fast", cpool_fast);
handle_output_record("cpool_slow", cpool_slow);
handle_output_record("arh", arh);
handle_output_record("afire_frac", afire_frac);
handle_output_record("acflux_fire", acflux_fire);
#ifdef KIRSTEN_LPJ
handle_output_record("mcflux_fire", mcflux_fire);
#endif
handle_output_record("arunoff", arunoff);
handle_output_record("sla", sla);
handle_output_record("mpar", mpar);
handle_output_record("mapar", mapar);
handle_output_record("xmphen", xmphen);
handle_output_record("anpp_add", anpp_add);
handle_output_record("mnpp", mnpp);
handle_output_record("mrunoff", mrunoff);
handle_output_record("aaet", aaet);
handle_output_record("mrh", mrh);
handle_output_record("mnpp_add", mnpp_add);
handle_output_record("maet", maet);
handle_output_record("xmgpp", xmgpp);
handle_output_record("mtemp_soil", mtemp_soil);
handle_output_record("xmcica", xmcica);
handle_output_record("xmlresp", xmlresp);
handle_output_record("xmsresp", xmsresp);
handle_output_record("xmrresp", xmrresp);
handle_output_record("xmgresp", xmgresp);
handle_output_record("xmaresp", xmaresp);
#ifdef KIRSTEN_LPJ
handle_output_record("mauw1", mauw1);
handle_output_record("mauw2", mauw2);
#else
handle_output_record("mw1", mw1);
handle_output_record("mw2", mw2);
#endif
handle_output_record("maep", maep);
handle_output_record("aaep", aaep);
#ifdef KIRSTEN_LPJ
handle_output_record("mpet_grid", mpet_grid);
handle_output_record("apet_grid", apet_grid);
#endif
handle_output_record("mintc", mintc);
handle_output_record("aintc", aintc);
#ifdef KIRSTEN_LPJ
handle_output_record("xmeangc", xmeangc);
handle_output_record("xmgp", xmgp);
handle_output_record("num_fire", num_fire);
handle_output_record("annum_fire", annum_fire);
handle_output_record("area_burnt", area_burnt);
handle_output_record("an_areafires", an_areafires);
handle_output_record("mfdi", mfdi);
handle_output_record("an_fdi", an_fdi);
handle_output_record("an_fseason", an_fseason);
handle_output_record("acflux_trace", acflux_trace);
handle_output_record("xmcflux_trace", xmcflux_trace);
handle_output_record("m_fc_crown", m_fc_crown);
handle_output_record("an_fc_crown", an_fc_crown);
handle_output_record("m_i_surface", m_i_surface);
handle_output_record("an_i_surface", an_i_surface);
#endif
handle_output_record("gdd", gdd);
handle_output_record("height", height);
handle_output_record("mgpp", mgpp);
handle_output_record("wu", wu);
handle_output_record("wl", wl);
handle_output_record("dphen", dphen);
handle_output_record("lresp", lresp);
handle_output_record("sresp", sresp);
handle_output_record("rresp", rresp);
handle_output_record("gresp", gresp);
handle_output_record("fbare", fbare);
handle_output_record("mpet", mpet);
handle_output_record("arunoff_drain", arunoff_drain);
handle_output_record("arunoff_surf", arunoff_surf);
handle_output_record("mrunoff_drain", mrunoff_drain);
handle_output_record("mrunoff_surf", mrunoff_surf);
handle_output_record("apet", apet);
handle_output_record("mprecip", mprecip);
handle_output_record("aprec", aprec);
handle_output_record("lai_ind", lai_ind);
handle_output_record("total_anpp", &total_anpp);
Am I overlooking something simple?! Or is this likely to be a complex task to solve?
Either way, I'd be grateful for any help or advice offered. Any further details required, please let me know and I'll try my best to provide them.
Many thanks,
Steve