I must be doing something wrong, but I cannot get the 'C' to link to the FTN95, no matter which calling sequence I use.
I've checked for other posts on this, but they all indicate that what I'm doing should work.
I have a large quantity of 'C++' code (in .cpp files) that I have compiled into a single library. There is one interfacing function that I will call from FTN95. I have the code snippets from the FTN 95 and C-source below, along with the linker message and the runtime error. The runtime shows that it cannot call _PDFCreate, yet the linker states that PDFCreate cannot be found. It would appear that SCC is not creating the linkage name that matches the FTN name, but I can find no options in SCC compiler to force a specific name.
I've tried STDCALL and changed the 'C' code to the __stdcall form, but no joy there either.
In the 'C' created .LIB file that I include as reference, PDCreate appears to have several 'incarnations' in naming, including '_PDFCreate__C' as well as 'PDFCreate'. I've tried all the logical variations, to no avail.
Any help is appreciated, Bill
In the FTN source: C_EXTERNAL PDFCREATE 'PDFCreate'(STRING) ... call PDFCREATE(TRIM(OPENED_FILENAME(I)))
In the 'C' source, compiled by SCC:
extern 'C' void PDFCreate(char *argv)
From the Link step: Compilation completed with no errors. Linking... WARNING the following symbols are missing: PDFCreate Z:\CMASTERF95\CheckMate\Win32\NEW_COPEN.obj (Z:\CMASTERF95\CFUNC\NEW_COPEN.FOR) Creating executable: CheckMate\Win32\C-MASTER.exe Creating Linker map file: map-c-master.map Linking completed.
Runtime error from program:z:\cmasterf95\checkmate\win32\c-master.exe Run-time Error *** Error 29, Call to missing routine : _PDFCreate at 0x00489bfa.
COPEN - in file new_copen.for at line 226 [+1d4f] [recur= 1]
LPCLOSE - in file lpset.for at line 80 [+00a0] CQUADB - in file cquadbld.for at line 242 [+21ad] XMMANT - in file cmaint.for at line 46 [+0551] main - in file cmain.for at line 89 [+0522]