Diese Seite mit anderen teilen ...

Informationen zum Thema:
JAPI Forum
Beiträge im Thema:
Erster Beitrag:
vor 15 Jahren, 8 Monaten
Letzter Beitrag:
vor 15 Jahren, 8 Monaten
Beteiligte Autoren:
Merten, Abdul, Bui Thanh Tam

How to make JAPI under MS Fortran Powerstation 4

Startbeitrag von Bui Thanh Tam am 10.02.2001 18:08

Dear friends,

I am interesting in using JAPI for my fortran program. I am currently using MS Fortran Powerstation4 and Compaq Visual Fortran 6.5. Can any one tell me how to compile JAPI source under these two compilers. And I can not find japi.f in the download source.

Many thanks


Re: How to make JAPI under MS Fortran Powerstation

Here are quick and easy steps to try to make JAPI work with Fortran Powerstation 4.0
and CVF6.0:

First: Since both Fortran Powerstation 4.0 and CVF6.0 do DLL, grab the JAPI LF95
(japi.dll, japi.lib, japi.f and some examples.f) and try it.

There three things can happen:
1. evrything works. that's great
2. you get LINK Error of the kind: Undefined symbol "J_ADD"
in module "button.f" at location000110D5.
This is still not bad.
What this error means is the exported symbol does not match the
imported symbol.
In this case you get rid of japi.lib and replace it with your own. For this
you need to have BC5.5 , LCC or some other C compiler that have
tools like impdef.exe and implib.exe

In creating your own japi.lib this is what you do:
Run impdef on japi.dll to creat a text file japi.def
this is just a file of exported symbols and looks like this

DllMain = _DllMain@12
j_add_ @2 ; j_add_
j_additem_ @3 ; j_additem_
j_alert0_ @4 ; j_alert0_
j_alert1_ @5 ; j_alert1_
j_alert2_ @6 ; j_alert2_
j_alert3_ @7 ; j_alert3_

Here you see the problem , the DLL exports j_add_ and the program in
the case of the above error, is trying to import J_ADD
( Note in your case tis might be different)
the solution is symbol aliasing. For this case you edit japi.def as such


J_ADD = j_add_
J_ADDITEM = j_additem_
J_ALERT0 = j_alert0_
J_ALERT1 = j_alert1_
J_ALERT2 = j_alert2_
J_ALERT3 = j_alert3_

Now you run implib.exe on the modified japi.def to produce japi.lib
and everything shoul work fine

3. You dont even get undefined symbol error. Here you check the
keyword for importing symbols in japi.f it is DLL_IMPORT (ala lf95)
check how Fortran Powerstation 4.0 and CVF6.0 do it, and edit japi.f
accordingly. And if you get undefined symbols you go to 2

I think and hope this will easily solve your problem .



von Abdul - am 11.02.2001 22:39

Re: How to make JAPI under MS Fortran Powerstation

The MS Powerstation 4 Compiler will be suported soon .....


von Merten - am 12.02.2001 17:01

MS Fortran Powerstation 4

I have done a patch to use the MS fortran powerstation. For now its experimental, allthough all examples are running. If there is someone out there, who want's to be a beta tester, please send me a mail, and i will send you the adapted DLL.


von Merten - am 19.02.2001 10:57
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.