Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

using IMSL from VC++

johnr168
Einsteiger
2.194Aufrufe
Hi,

I'm a newbie to mixed language environments and have run into trouble trying to call an IMSL routine from Visual C++ 6. I've read the documentation and samples but can't get a simple program to link. It complies OK but get a whole lot of likner error messages (87 in fact) that look something like:

imsl.lib(DTRSV.obj) : error LNK2001: unresolved external symbol _E1PSH@8
imsl.lib(DGER.obj) : error LNK2001: unresolved external symbol _E1PSH@8

etc.

The header of the C++ code has

extern "C" {
void __stdcall DRLINE(long*, double*, double*, double*, double*, double*);
}

I've used 'imsl.h' and tried to link with df all with the same problem.

help!

Thanks

John R
0 Kudos
3 Antworten
Steven_L_Intel1
Mitarbeiter
2.194Aufrufe
Are you also linking against the three IMSL libraries? The declaration you show isn't the one for the routine in the error message.

Steve
johnr168
Einsteiger
2.194Aufrufe
Thanks Steve,

This is a strange one. I did as suggested and link all three libraries. This threw up more link-time errorswith complaints about not finding __OtsMove, __FIsqrt and a whole lot of others.

So I added a whole lot of other libraries in for good measure dfor.lib dfqwin.lib dfqw_sdi.lib. Each time old errors were fixed but new ones were added! Finally I was left one error:

Linking...
dfqwin.lib(qwkentry.obj) : error LNK2001: unresolved external symbol __beginthreadex


Is there no simple way to add IMSL to C++? Or am I too dumb? I feel like it after playing around with this for a few days.

John
Steven_L_Intel1
Mitarbeiter
2.194Aufrufe
Get rid of all the df* libs you added and replace them with dformt.lib and dfconsol.lib.

Steve
Antworten