Board index » cppbuilder » unresolved error with FITS

unresolved error with FITS


2003-10-08 08:52:58 PM
cppbuilder96
Hi all,
I have a problem which keeps occuring when i try to build my program.
First, the program is used for reading a particular image file called FITS.
The 'fitsio.h' file is included without a problem and compiling is no
problem.
However when i try to build, the following error occurs,
"Error: Error: Unresolved external '_ffopen' referenced from
D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
I suspect it is because i do not have a .lib or .dll file specified
correctly but i do not know how to do this.
Can anyone help please?
thanks
Tel:+353 21 4326297
Fax:+353 21 4345191
E-mail: XXXX@XXXXX.COM / XXXX@XXXXX.COM
website: www.emssg.cit.ie
 
 

Re:unresolved error with FITS

I think you are correct in your assumtion. The header file only provides
function templates for the functions to be used. An actual library or DLL
is what supplies the code for those functions.
If the FITS library is a DLL.
Locate the DllName.LIB file
If there is no such file or if there are complaints about it
when you later try to build the program you can create
a new one with a command like this one:
implib -c DllName.LIB DllName.DLL
where the command is executed when the default
directory is the project directory
Else locate the LIB file
Go to the project window
Highlight the EXE name by clicking on it
Press the Insert key
A file selection dialog will open, select the *.LIB file
Now do a Project|Make
If you do know where the library or DLL for the FITS library is then you
will not be able to build the program until you locate it.
. Ed
Quote
Alan Giltinan wrote in message
news: XXXX@XXXXX.COM ...

Hi all,
I have a problem which keeps occuring when i try to build my program.
First, the program is used for reading a particular image file called
FITS.
The 'fitsio.h' file is included without a problem and compiling is no
problem.
However when i try to build, the following error occurs,
"Error: Error: Unresolved external '_ffopen' referenced from
D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
I suspect it is because i do not have a .lib or .dll file specified
correctly but i do not know how to do this.

Can anyone help please?
thanks
 

Re:unresolved error with FITS

Thanks Ed,
Worked like a charm...
I am now getting another error which i presume to be a function within the
.LIB itself.
"Error: Error: 'D:\CFITSIO\CFITSIODLL_2470_LATEST\CFITSIO.LIB' contains
invalid OMF record, type 0x21"
If i cant get around it i will contact the cftsio people about it if i can.
Thanks again
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
I think you are correct in your assumtion. The header file only provides
function templates for the functions to be used. An actual library or DLL
is what supplies the code for those functions.

If the FITS library is a DLL.
Locate the DllName.LIB file
If there is no such file or if there are complaints about it
when you later try to build the program you can create
a new one with a command like this one:
implib -c DllName.LIB DllName.DLL
where the command is executed when the default
directory is the project directory

Else locate the LIB file

Go to the project window
Highlight the EXE name by clicking on it
Press the Insert key
A file selection dialog will open, select the *.LIB file

Now do a Project|Make

If you do know where the library or DLL for the FITS library is then you
will not be able to build the program until you locate it.

. Ed

>Alan Giltinan wrote in message
>news: XXXX@XXXXX.COM ...
>
>Hi all,
>I have a problem which keeps occuring when i try to build my program.
>First, the program is used for reading a particular image file called
FITS.
>The 'fitsio.h' file is included without a problem and compiling is no
>problem.
>However when i try to build, the following error occurs,
>"Error: Error: Unresolved external '_ffopen' referenced from
>D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
>I suspect it is because i do not have a .lib or .dll file specified
>correctly but i do not know how to do this.
>
>Can anyone help please?
>thanks


 

{smallsort}

Re:unresolved error with FITS

although it might have something to do with this COFF to OMF business
"Ed Mulroy [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
I think you are correct in your assumtion. The header file only provides
function templates for the functions to be used. An actual library or DLL
is what supplies the code for those functions.

If the FITS library is a DLL.
Locate the DllName.LIB file
If there is no such file or if there are complaints about it
when you later try to build the program you can create
a new one with a command like this one:
implib -c DllName.LIB DllName.DLL
where the command is executed when the default
directory is the project directory

Else locate the LIB file

Go to the project window
Highlight the EXE name by clicking on it
Press the Insert key
A file selection dialog will open, select the *.LIB file

Now do a Project|Make

If you do know where the library or DLL for the FITS library is then you
will not be able to build the program until you locate it.

. Ed

>Alan Giltinan wrote in message
>news: XXXX@XXXXX.COM ...
>
>Hi all,
>I have a problem which keeps occuring when i try to build my program.
>First, the program is used for reading a particular image file called
FITS.
>The 'fitsio.h' file is included without a problem and compiling is no
>problem.
>However when i try to build, the following error occurs,
>"Error: Error: Unresolved external '_ffopen' referenced from
>D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
>I suspect it is because i do not have a .lib or .dll file specified
>correctly but i do not know how to do this.
>
>Can anyone help please?
>thanks


 

Re:unresolved error with FITS

If CFITSIO.LIB is an import library for a DLL (probably for CFITSIO.DLL)
then you can make another with the implib command I showed you.
If it is a static library, a library containing object files with code, and
it is made for a different compiler, for instance for the Microsoft
compiler, then you cannot use it. Request a copy made for Borland C++.
. Ed
Quote
Alan Giltinan wrote in message
news: XXXX@XXXXX.COM ...

Worked like a charm...
I am now getting another error which i presume to be a
function within the .LIB itself.
"Error: 'D:\CFITSIO\CFITSIODLL_2470_LATEST\CFITSIO.LIB'
contains invalid OMF record, type 0x21"
If i cant get around it i will contact the cftsio people about it
if i can.
Thanks again
 

Re:unresolved error with FITS

On Wed, 8 Oct 2003 15:36:46 +0100, "Alan Giltinan" < XXXX@XXXXX.COM >
wrote:
Quote
although it might have something to do with this COFF to OMF business

<snip>
>>Can anyone help please?
>>thanks
>
>

I think coff2oem only works on import libs.
static lib:
So if it is a static lib, you are probably out of luck.
(small chance the vendor can supply a Borland 502 version).
if you can get the source code, you may be able to build
your own.
dll:
Do what the man said and use implib. If you find classes, etc.
exported you probably can't use them but I know
you should be able to use extern_c calls.
HTH,
Jeff Kish
 

Re:unresolved error with FITS

thanks jeff,
I tried the implib and still no joy. I have since found out that it was
compiled for VC++ 7.0, and not borland C++.
I have visual studio.net, containing VC++ 7.0 so i will give that a try to
see if it works
thanks
Alan
"Jeff Kish" < XXXX@XXXXX.COM >wrote in message
Quote
On Wed, 8 Oct 2003 15:36:46 +0100, "Alan Giltinan" < XXXX@XXXXX.COM >
wrote:

>although it might have something to do with this COFF to OMF business
>
<snip>
>>>Can anyone help please?
>>>thanks
>>
>>
>
I think coff2oem only works on import libs.

static lib:

So if it is a static lib, you are probably out of luck.
(small chance the vendor can supply a Borland 502 version).
if you can get the source code, you may be able to build
your own.


dll:
Do what the man said and use implib. If you find classes, etc.
exported you probably can't use them but I know
you should be able to use extern_c calls.


HTH,


Jeff Kish
 

Re:unresolved error with FITS

hi again all,
I also have ansi c, which i believe borland will compile, but i get the same
error as i got first time bout the "unresolved external...."
the implib has been run with no problems so its not a OMF/COFF problem. The
turbo de{*word*81} also runs so can i assume that the paths of the .LIB and .DLL
are visible to the program. it seems to be a setting with the compiler that
is the problem.. Any more thoughs?? Much appreciated
Alan
"Alan Giltinan" < XXXX@XXXXX.COM >wrote in message
Quote
Hi all,
I have a problem which keeps occuring when i try to build my program.
First, the program is used for reading a particular image file called
FITS.
The 'fitsio.h' file is included without a problem and compiling is no
problem.
However when i try to build, the following error occurs,
"Error: Error: Unresolved external '_ffopen' referenced from
D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
I suspect it is because i do not have a .lib or .dll file specified
correctly but i do not know how to do this.

Can anyone help please?
thanks
--
Yours sincerely,
Alan Giltinan,
Environmental Monitoring and Space Science Group,
Department of Applied Physics and Instrumentation,
Cork Institute of Technology,
Bishopstown,
Cork,
Ireland.

Tel:+353 21 4326297
Fax:+353 21 4345191

E-mail: XXXX@XXXXX.COM / XXXX@XXXXX.COM
website: www.emssg.cit.ie



 

Re:unresolved error with FITS

Alan Giltinan wrote:
Quote
the implib has been run with no problems so its not a OMF/COFF problem. The
Did you add the resultant lib to your project?
You can use TLIB to list the functions inside that lib. Make sure
that the name that TLIB reports is in fact "_ffopen" complete with one
underscore, and all lowercase. If it is close, but not exact, then you
will need to adjust the header file, and your code to match.
Quote

"Alan Giltinan" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>The 'fitsio.h' file is included without a problem and compiling is no
>problem.
>However when i try to build, the following error occurs,
>"Error: Error: Unresolved external '_ffopen' referenced from
>D:\CFITSIO\CEXAMPLES\TEST_FITS.OBJ"
 

Re:unresolved error with FITS

On Thu, 9 Oct 2003 14:40:45 +0100, "Alan Giltinan" < XXXX@XXXXX.COM >
wrote:
Quote
thanks jeff,
I tried the implib and still no joy. I have since found out that it was
compiled for VC++ 7.0, and not borland C++.
I have visual studio.net, containing VC++ 7.0 so i will give that a try to
see if it works
thanks
Alan
<snip>
if it is a dll, then you should be able to at least implib and link to
it. Did you get link errors, or run time errors?
Thanks, and good luck
Jeff Kish
 

Re:unresolved error with FITS

Hi,
I eventually got it linking and running.. though it crashes for other
reasons..
It turns out that a header file was omitted from the downloadable file so i
just included this header file and it worked. A simple solution, though not
very obvious since i had to go looking through lines of code to find that a
header file was not called.
Anyway, thanks all for your help. It is great to see such a willing and
helpful community running
Alan
"Jeff Kish" < XXXX@XXXXX.COM >wrote in message
Quote
On Thu, 9 Oct 2003 14:40:45 +0100, "Alan Giltinan" < XXXX@XXXXX.COM >
wrote:

>thanks jeff,
>I tried the implib and still no joy. I have since found out that it was
>compiled for VC++ 7.0, and not borland C++.
>I have visual studio.net, containing VC++ 7.0 so i will give that a try
to
>see if it works
>thanks
>Alan
<snip>
if it is a dll, then you should be able to at least implib and link to
it. Did you get link errors, or run time errors?
Thanks, and good luck
Jeff Kish