CFITSIO unresolved external symbol error
I am compiling my source code which is calling "fitsio.h" file from fits library , and then in fitsio.h another header file is getting called named longname.h , this ffclos , ffgpxv all are defined in "longnam.h" .While I am compiling its giving error message :
usimage.cpp
Generating Code...
Linking...
Creating library .\Output/gci2.lib and object .\Output/gci2.exp
cam_simulator.obj : error LNK2001: unresolved external symbol _ffclos
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgpxv
cam_simulator.obj : error LNK2001: unresolved external symbol _ffthdu
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgisz
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgidm
cam_simulator.obj : error LNK2001: unresolved external symbol _ffghdt
cam_simulator.obj : error LNK2001: unresolved external symbol _ffghdt
.\Release/gci2.dll : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
PixCel.exe - 8 error(s), 3 warning(s)
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
karimkhan
I am compiling my source code which is calling "fitsio.h" file from fits library , and then in fitsio.h another header file is getting called named longname.h , this ffclos , ffgpxv all are defined in "longnam.h" .While I am compiling its giving error message :
usimage.cpp
Generating Code...
Linking...
Creating library .\Output/gci2.lib and object .\Output/gci2.exp
cam_simulator.obj : error LNK2001: unresolved external symbol _ffclos
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgpxv
cam_simulator.obj : error LNK2001: unresolved external symbol _ffthdu
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgisz
cam_simulator.obj : error LNK2001: unresolved external symbol _ffgidm
cam_simulator.obj : error LNK2001: unresolved external symbol _ffghdt
cam_simulator.obj : error LNK2001: unresolved external symbol _ffghdt
.\Release/gci2.dll : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
PixCel.exe - 8 error(s), 3 warning(s)
I already done with linking the cfitsio library by project setting/link/path of .lib file
and I also added environment variable
In runtime library multithreaded dll is also set , and also added additional library path ,
I am using vc ++ 6.0 and win XP....
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
karimkhan
I already done with linking the cfitsio library by project setting/link/path of .lib file
That is not enough. You have to actually give the name of the library you're linking in the project settings. Just giving the path of where the library exists is not enough.
Regards,
Paul McKenzie
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
Paul McKenzie
That is not enough. You have to actually give the name of the library you're linking in the project settings. Just giving the path of where the library exists is not enough.
Regards,
Paul McKenzie
I already tried out with mentioning the library file name there in project setting ...is it necessary to keep library location at particular location?
After compiling and checking all the files when it start linking and reach at the function
"if ( !fits_open_diskfile(&fptr, "Winter.fit", READONLY, &status) ) {
#endif
if (fits_get_hdu_type(fptr, &hdutype, &status) || hdutype != IMAGE_HDU) {
// (void) wxMessageBox(wxT("FITS file is not of an image"),wxT("Error"),wxOK | wxICON_ERROR);
return true;
}
// Get HDUs and size
fits_get_img_dim(fptr, &naxis, &status);................
|"
It gives error message....
Re: CFITSIO unresolved external symbol error
Go to Project Settings -> tab Link -> add the .lib name to the list of "Object/library modules";
then open the Category "Input" and add the path of that .lib to the list of "Additional library path" list
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
VictorN
Go to Project Settings -> tab Link -> add the .lib name to the list of "Object/library modules";
then open the Category "Input" and add the path of that .lib to the list of "Additional library path" list
thanks for your reply Sir ,
But I already have given the path "C:\3270\cfitsio.lib' for additional library...this doesn's solve the problem.
Re: CFITSIO unresolved external symbol error
You either pass in the path C:\3270 to the path list + library name cfitsio.lib - to the list of modules
or you just pass in the full library name C:\3270\cfitsio.lib to the list of modules.
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
VictorN
You either pass in the path C:\3270 to the path list + library name cfitsio.lib - to the list of modules
or you just pass in the full library name C:\3270\cfitsio.lib to the list of modules.
Oh thank you Sir , I think it is progressing now
I added full library name x:\3270.lib to the "object/library module" in project setting
Now its not giving me error , but before I added this library once I compiled all source file in Build menu it was showing BUILD PIXCEL.EXE AND EXECUTE IXCEL.EXE , as my software is pixcel and after compiling it was allowing me to execute the .exe file
Now its giving me option "Build cfitsio.lib" and execute now showing pixcel.exe....
Now its doest show me option for pixcel.exe but
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
karimkhan
Oh thank you Sir , I think it is progressing now
I added full library name c:\3270\cfitsio.lib to the "object/library module" in project setting
Now its not giving me error , but before I added this library once I compiled all source file in Build menu it was showing BUILD PIXCEL.EXE AND EXECUTE IXCEL.EXE , as my software is pixcel and after compiling it was allowing me to execute the .exe file
Now its giving me option "Build cfitsio.lib" and execute now showing pixcel.exe....
Now its doest show me option for pixcel.exe but
In short when I add C:\3270\cfitsio.lib to the object/library modules it compiles successfully only fitsio.lib and not my original pixcel.exe
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
karimkhan
In short when I add C:\3270\cfitsio.lib to the object/library modules it compiles successfully only fitsio.lib and not my original pixcel.exe
:confused: :confused: :confused:
Adding or not the "cfitsio.lib to the object/library modules" has nothing to do with compiling. Only including or not the "fitsio.h" matters!
What did you mean by "it compiles successfully only fitsio.lib and not my original pixcel.exe"?
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
VictorN
:confused: :confused: :confused:
Adding or not the "cfitsio.lib to the object/library modules" has nothing to do with compiling. Only including or not the "fitsio.h" matters!
What did you mean by "it compiles successfully only fitsio.lib and not my original pixcel.exe"?
I mean now after adding this cfitsio.lib file when I compile source file at last it gives
"
Linking...
cfitsio.lib - 0 error(s), 4 warning(s)
While before I added fitsio it was giving me
PixCel.exe - 0 error(s), 0 warning(s)
and my software for which i am coding this that pixcel.exe was starting
So now it does not create pixcel.exe file ,
I really bored with this , please give me some sollution...
before I
Re: CFITSIO unresolved external symbol error
Quote:
Originally Posted by
karimkhan
I mean now after adding this cfitsio.lib file when I compile source file at last it gives
"
Linking...
cfitsio.lib - 0 error(s), 4 warning(s)
What type of project are you working with? Is it a some static library? :confused: