Compiler complains about Vegas routine


balashiha
02-28-2008, 04:15 PM
Hello,

I am having difficulty compiling the off-the CD program vegas in C++.

I have the includes
#include "nr3.h"
#include "vegas.h"

but the compiler complains bitterly. Any advice on necessary modifications is appreciated.

Ilia


[C++ Error] vegas.h(12): E2141 Declaration syntax error
[C++ Error] vegas.h(49): E2268 Call to undefined function 'rebin'
[C++ Warning] vegas.h(49): W8074 Structure passed by value
[C++ Warning] vegas.h(49): W8074 Structure passed by value
[C++ Warning] vegas.h(49): W8074 Structure passed by value
[C++ Error] vegas.h(81): E2451 Undefined symbol 'ran_vegas'
[C++ Warning] vegas.h(170): W8074 Structure passed by value
[C++ Warning] vegas.h(170): W8074 Structure passed by value
[C++ Warning] vegas.h(170): W8074 Structure passed by value
[C++ Warning] vegas.h(173): W8004 'Ran' is assigned a value that is never used
[C++ Warning] vegas.h(173): W8004 'RANSEED' is assigned a value that is never used
[C++ Warning] main.cpp(20): W8057 Parameter 'wgt' is never used

davekw7x
02-28-2008, 08:17 PM
[C++ Error] vegas.h(12): E2141 Declaration syntax error
[C++ Error] vegas.h(49): E2268 Call to undefined function 'rebin'


Line 12 declares a variable of type Ran. (So that's the problem it is complaining about: It doesn't know what a "Ran" is.)


The second error tells you exactly: It doesn't know what "rebin" is.

If these aren't clues enough, then consult the Master Dependency list and you will find that vegas.h needs stuff from ran.h and rebin.h

From this thread http://www.nr.com/forum/showthread.php?t=1361, here's the link:
http://www.nr.com/dependencies/masterdependency.txt

With the proper includes (and, therefore, the proper function/class definitions) the other warnings from vegas should also be resolved.


Regards,

Dave