|
-
March 30th, 2011, 12:50 AM
#1
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)
-
March 30th, 2011, 12:58 AM
#2
Re: CFITSIO unresolved external symbol error
 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....
-
March 30th, 2011, 01:50 AM
#3
Re: CFITSIO unresolved external symbol error
 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
-
March 30th, 2011, 02:39 AM
#4
Re: CFITSIO unresolved external symbol error
 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....
-
March 30th, 2011, 03:04 AM
#5
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
Victor Nijegorodov
-
March 30th, 2011, 04:02 AM
#6
Re: CFITSIO unresolved external symbol error
 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.
-
March 30th, 2011, 04:06 AM
#7
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.
Victor Nijegorodov
-
March 30th, 2011, 05:20 AM
#8
Re: CFITSIO unresolved external symbol error
 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
-
March 30th, 2011, 06:53 AM
#9
Re: CFITSIO unresolved external symbol error
 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
-
March 30th, 2011, 06:57 AM
#10
Re: CFITSIO unresolved external symbol error
Victor Nijegorodov
-
March 30th, 2011, 09:50 AM
#11
Re: CFITSIO unresolved external symbol error
 Originally Posted by VictorN
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
-
March 30th, 2011, 09:58 AM
#12
Re: CFITSIO unresolved external symbol error
 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?
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|