- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
To be specific, for instance, I want to call a function atg(x1,x2), which is in mathlib of the CERNLIB. What I did is:
1) I added "E:\\MathTools\\Cernlib"inProperties->Linker->General->Additional Library Directories
2) I added mathlib.lib, which is in the above quoted directory, in Properties->Linker->Input->Additional Dependencies
3) Then after Build Solution, I got two error messages:
error LNK2019 and fatal error LNK1120
I would appreciate it very much if somebody can tell me the solution. Thanks in advance!
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Assuming that CERNLIB.LIB is a static library (and not a DLL, so no need for IMPORT directives), why not just include CERNLIB.LIB as a file into your project/solution explicitly first and see if that works?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I want to use MINUIT. For that, I need mathlib.lib, kernlib.lib and packlib.lib which all belong to CERNLIB. I failed. I've checked, the errors werereally due to using functions in
Then I tried a very simple case. As I said in my post, I tried the function atg(x1,x2), which is B101 in elementary functions in CERNLIB.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Did you compile the cernlib on your system with the IVF compiler or did you download the lib files ?
Les
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Well out of curiosity, I gave it a try and attach a IVF solution for the MINUIT program.
I obtained the MINUITfiles from cernlib\2006\src\packlib\minuit\code and the
test program files MINEXAM and FCNK0 from cernlib\2006\src\packlib\minuit\examples.
The only additional code required wasa version of INTRAC.F that has been taken from
cernlib\2006\src\packlib\kernlib\kerngen\tcgenc,and it has been assumed to be valid
for use on Windows XP Systems (There does not appear to be a special version specifically
recognisable as targeting Windows systems).
I eventually got the MINUIT test program MINEXAM to run under CVF without access violations by making all reals REAL(8) and selecting VMS and F77 compatibilities under project settings, defaulting reals toREAL(8)and extending single precision constants to double etc. (Change details are in the file NEWd506cm.FOR).
I eventually got it to run to completion in debug and release versions and include the results obtained (which appear identical).
I then, from scratch (I did not convert the CVF projects) created an IVF solution for the MINUIT code as a static library and tested it using the MINEXAM test console program , both in release mode, and it ran to completion first time, producing identical output to the CVF program, which was a great relief.
You are welcome to use the code. But judging fromthis experience with MINUIT, there could still be bugs awaiting you in there somewhere!
P.S. I used CVF6.6d and VS2005+IVF 11.1.054
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I'll try that. Anyway, MINUIThasbeencommonly used in the community of high energy physics and nuclear physics for many years. So I think the chance to find a bug is tiny...
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
FUNCTION ATG(X1,X2)
PARAMETER (PI = 3.14159 26535 89793D0)
ATG=ATAN2(X1,X2)+(PI-SIGN(PI,X1))
RETURN
END
Note the deliberate omission of specification statements, in whose absence the variables take on their default sizes. You should add them yourself and you can define REAL(4) and REAL(8) versions yourself and just compile them along with your main program code.
You do not need the sledgehammer of the whole of CERNLIB in order to crack this nut!
Beware, the above is a typical example of rubbish code found in many places in CERNLIB.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
"Anyway, MINUIThasbeencommonly used in the community of high energy physics and nuclear physics for many years. So I think the chance to find a bug is tiny..."
Well, my first try with CVF tripped on a couple!
So the chance may be 'tiny', but it is non-zero. My feelings are aptly summed up in this blog comment I found today: http://mtrr.org/blog/?p=14
...and here is another highly amusing rant against the CERNLIB code: http://www.beowulf.org/archive/2005-October/013985.html