I built the TensorFlow v2.4 C++ API on Windows and now I am trying to run my application, however the linker complains for unresolved externals.
I am trying to build a library with some custom OPs which I was successfully able to compile under Linux, but on Windows I get this:
Error LNK2019 unresolved external symbol "public: __cdecl tensorflow::Status::Status(enum tensorflow::error::Code,class std::basic_string_view<char,struct std::char_traits<char> >,class std::vector<struct tensorflow::StackFrame,class std::allocator<struct tensorflow::StackFrame> > &&)" (??0Status#tensorflow##QEAA#W4Code#error#1#V?$basic_string_view#DU?$char_traits#D#std###std##$$QEAV?$vector#UStackFrame#tensorflow##V?$allocator#UStackFrame#tensorflow###std###5##Z) referenced in function "public: __cdecl tensorflow::Status::Status(enum tensorflow::error::Code,class std::basic_string_view<char,struct std::char_traits<char> >)" (??0Status#tensorflow##QEAA#W4Code#error#1#V?$basic_string_view#DU?$char_traits#D#std###std###Z) TF_Project main_cc.obj 1
Error LNK2019 unresolved external symbol "class tensorflow::Status __cdecl tensorflow::GetNodeAttr(class tensorflow::AttrSlice const &,class std::basic_string_view<char,struct std::char_traits<char> >,int *)" (?GetNodeAttr#tensorflow##YA?AVStatus#1#AEBVAttrSlice#1#V?$basic_string_view#DU?$char_traits#D#std###std##PEAH#Z) referenced in function "public: class tensorflow::Status __cdecl tensorflow::shape_inference::InferenceContext::GetAttr<int>(class std::basic_string_view<char,struct std::char_traits<char> >,int *)const " (??$GetAttr#H#InferenceContext#shape_inference#tensorflow##QEBA?AVStatus#2#V?$basic_string_view#DU?$char_traits#D#std###std##PEAH#Z) TF_Project main_cc.obj 1
Error LNK2019 unresolved external symbol "private: void __cdecl tensorflow::kernel_factory::OpKernelRegistrar::InitInternal(class tensorflow::KernelDef const *,class std::basic_string_view<char,struct std::char_traits<char> >,class std::unique_ptr<class tensorflow::kernel_factory::OpKernelFactory,struct std::default_delete<class tensorflow::kernel_factory::OpKernelFactory> >)" (?InitInternal#OpKernelRegistrar#kernel_factory#tensorflow##AEAAXPEBVKernelDef#3#V?$basic_string_view#DU?$char_traits#D#std###std##V?$unique_ptr#VOpKernelFactory#kernel_factory#tensorflow##U?$default_delete#VOpKernelFactory#kernel_factory#tensorflow###std###6##Z) referenced in function "void __cdecl `dynamic initializer for 'register_kernel_4''(void)" (??__Eregister_kernel_4##YAXXZ) TF_Project main_cc.obj 1
I tried all sorts of things, I compiled tensorflow.dll, tensorflow_cc.dll and tensorflow_framework.dll
I tried to link against all 3 in all sorts of combinations, but the missing symbols are not found.
Am I missing some library that I should link against?
I did a simple test to verify that the libraries I built are valid and they seem so.
Calling tf_monolithic_build(); and tf_compiler_version();
does not produce unresolved externals and returns expected results.
Any help would be greatly appreciated!
Update 1:
Tried to do some digging on the first error.
The Status class is contained within 2 files : status.h and status.cc that live in tensorflow\core\platform
The problematic missing constructor is indeed defined in status.cc, so that should mean that status.cc.o is not part of tensorflow_cc.dll?
Why can this be? In tensorflow\core\platform\BUILD I can see these is some code for compiling the files to a library called status
cc_library(
name = "status",
srcs = ["status.cc"],
hdrs = ["status.h"],
deps = [
":logging",
":macros",
":mutex",
":stacktrace",
":str_util",
":strcat",
":stringpiece",
":stringprintf",
":types",
"//tensorflow/core/protobuf:error_codes_proto_impl_cc",
"#com_google_absl//absl/base",
],
)
Unfortunately my Bazel-fu is very limited and I have no idea how to verify that this library is indeed compiled during the 6 hour long process and is indeed wrapped inside the final DLL file.
Related
I am new in c++ but i need to do a project using opencv.
I have downlaoded opencv-4.5.2 and opencv_contrib and I am using Visual 2019.
I have used cmake and I got no error.
Then in the project I have included, the "C:\opencv\opencv_lib\install\include" directory fot the C++ additional include directories
For the Linker I have included ,"C:\opencv\opencv_lib\install\x64\vc16\lib" for the additional library directories.
I have included, "opencv_core452.lib,opencv_highgui452.lib,opencv_imgcodecs452.lib", int he additional dependacies.
I have included, "C:...opencv\build\x64\vc14\bin" for the path.
When i run a simple project it seems that something goes wrong and I am not sure what it is.
Here are the errors:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: class cv::Mat & __thiscall cv::Mat::operator=(class cv::Mat &&)" (??4Mat#cv##QAEAAV01#$$QAV01##Z) referenced in function _main protorype C:...\protorype.obj 1
Error LNK2019 unresolved external symbol "public: __thiscall cv::Mat::Mat(void)" (??0Mat#cv##QAE#XZ) referenced in function _main protorype C:...\protorype.obj 1
Error LNK2019 unresolved external symbol "public: __thiscall cv::Mat::~Mat(void)" (??1Mat#cv##QAE#XZ) referenced in function _main protorype C:...\protorype.obj 1
Error LNK2019 unresolved external symbol "class cv::Mat __cdecl cv::imread(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int)" (?imread#cv##YA?AVMat#1#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z) referenced in function _main protorype C:...\protorype.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::namedWindow(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int)" (?namedWindow#cv##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z) referenced in function _main protorype C:...\protorype.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class cv::debug_build_guard::_InputArray const &)" (?imshow#cv##YAXABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABV_InputArray#debug_build_guard#1##Z) referenced in function _main protorype C:...\protorype.obj 1
Error LNK1120 6 unresolved externals protorype C:...\protorype.exe 1
Because I am new, please explain me in simple words hwo to resolve it.
Thank you in advance!
I finally found it.
I dont know, probably eventhough I was using the right libraries and using the right directories as well, I decided to copy all the libraries into the dependacies and not just those that i use and it workes. Here are all the directories for my case, but note that if you are usign a different version probably they are different.
opencv_aruco452d.lib opencv_barcode452d.lib opencv_bgsegm452d.lib opencv_bioinspired452d.lib opencv_calib3d452d.lib opencv_ccalib452d.lib opencv_core452d.lib opencv_datasets452d.lib opencv_dnn_objdetect452d.lib opencv_dnn_superres452d.lib opencv_dnn452d.lib opencv_dpm452d.lib opencv_face452d.lib opencv_features2d452d.lib opencv_flann452d.lib opencv_fuzzy452d.lib opencv_gapi452d.lib opencv_hdf452d.lib opencv_hfs452d.lib opencv_highgui452d.lib opencv_img_hash452d.lib opencv_imgcodecs452d.lib opencv_imgproc452d.lib opencv_intensity_transform452d.lib opencv_line_descriptor452d.lib opencv_mcc452d.lib opencv_ml452d.lib opencv_objdetect452d.lib opencv_optflow452d.lib opencv_phase_unwrapping452d.lib opencv_photo452d.lib opencv_plot452d.lib opencv_quality452d.lib opencv_rapid452d.lib opencv_reg452d.lib opencv_rgbd452d.lib opencv_saliency452d.lib opencv_shape452d.lib opencv_stereo452d.lib opencv_stitching452d.lib opencv_structured_light452d.lib opencv_superres452d.lib opencv_surface_matching452d.lib opencv_text452d.lib opencv_tracking452d.lib opencv_video452d.lib opencv_videoio452d.lib opencv_videostab452d.lib opencv_wechat_qrcode452d.lib opencv_xfeatures2d452d.lib opencv_ximgproc452d.lib opencv_xobjdetect452d.lib opencv_xphoto452d.lib
This question has already been asked here, but since I have many more details to provide, I think it is best to start with a new question.
I have trouble linking the ImageMagick lib files in my program that uses the Visual Studio MSVC 2015 compiler. Here are the steps I have followed:
I have compiled the static MT runtimes by using the "configure.exe" utility and built in Visual Studio the solution it generated, "VisualStaticMT.sln". This creates lib files such as "CORE_RL_Magick++_.lib" in C:\ImageMagick-6.9.3-2\VisualMagick\lib.
In my C++11 program, the configuration relevant to ImageMagick is (I use QtCreator, but with the MSVC2015 compiler):
INCLUDEPATH += \
C:\ImageMagick-6.9.3-2\ImageMagick\Magick++\lib \
C:\ImageMagick-6.9.3-2\ImageMagick
LIBS += \
-lC:\ImageMagick-6.9.3-2\VisualMagick\lib\CORE_RL_Magick++_ \
-lC:\ImageMagick-6.9.3-2\VisualMagick\lib\CORE_RL_wand_ \
-lC:\ImageMagick-6.9.3-2\VisualMagick\lib\CORE_RL_magick_
QMAKE_CXXFLAGS += \
-DMAGICKCORE_HDRI_ENABLE=0 \
-DMAGICKCORE_QUANTUM_DEPTH=16
A piece of the program contains:
#include <Magick++.h>
...
Magick::Image img;
img = Magick::Image(filename);
When compiling I get link errors:
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(void)" (__imp_??0Image#Magick##QAE#XZ) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0Image#Magick##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image#Magick##UAE#XZ) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Magick::Image & __thiscall Magick::Image::operator=(class Magick::Image const &)" (__imp_??4Image#Magick##QAEAAV01#ABV01##Z) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::write(long,long,unsigned int,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum MagickCore::StorageType,void *)" (__imp_?write#Image#Magick##QAEXJJIIABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##W4StorageType#MagickCore##PAX#Z) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
movie.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: struct MagickCore::_Image const * __thiscall Magick::Image::constImage(void)const " (__imp_?constImage#Image#Magick##QBEPBU_Image#MagickCore##XZ) referenced in function "public: __thiscall Frame<unsigned char>::Frame<unsigned char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0?$Frame#E##QAE#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
release\corr.exe : fatal error LNK1120: 6 unresolved externals
The "dllimport" error suprises me, as I think there should be no DLL involved with the "static MT runtimes" I am using.
Any idea on how I could solve the problem?
Thanks.
EDIT
A few more things I have tried:
Linking the libraires with the lines below in main.cpp gave the same errors:
#pragma comment(lib, "CORE_RL_Magick++_.lib")
#pragma comment(lib, "CORE_RL_wand_.lib")
#pragma comment(lib, "CORE_RL_magick_.lib")
I tried to add all the 27 lib files located in C:\ImageMagick-6.9.3-2\VisualMagick\lib. If I exclude CORE_RL_exr_.lib, I get the same error. If I include it, I get additional errors that suggest this file should not be added:
CORE_RL_exr_.lib(IexBaseExc.obj):-1: error: LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in main.obj
probably you are missing some library files. because your program is unable to link library file that's why it gives linker error. Try to link lib file externally .. try this code before main method..
#pragma comment(lib, "CORE_DB_magick++.lib")
you can download this lib file from given below link.
https://github.com/moravianlibrary/Open-DPI-Detector/tree/master/OpenDpiDetector/Libraries/ImageMagick-6.7.6/VisualMagick/lib
To be able to link your app with static build of ImageMagick you have to do couple of tricks (as for ImageMagick-7.0.8-11):
add preprocessor definition STATIC_MAGICK to your visual studio project
add missing input library CORE_DB_croco_.lib/CORE_RL_croco_.lib in the Linker->Input (other libs ImageMagick adds automatically via #pragma)
rename CORE_XX_liblzma_.pdb -> CORE_XX_lzma_.lib (ImageMagick links this lib with other name, probably bug), XX = RL or DB
The answer to linking the ImageMagick static libraries is to ensure you link all the dependant static libraries as well!
Once you have compiled the solution for ImageMagick static libraries, go to the 'VisualMagick' folder (within the ImageMagick cloned repository) then to to the 'lib' folder there you will see all the *_DB_*.lib and *_RL_*.lib files for Debug and Release.
You need to include those names in the 'Additional Dependencies' section for both Release and Debug.
Another key aspect is to ensure the libraries are built by the same compiler for the same platform architecture as your own application .. (WIN32 or x64).
I have a project that used to compile just fine, using the freetype library.
Since then my OS has been reinstalled and therefore so has Visual Studio 2010.
I have re-included and reinstalled all of the .lib .dll and header files. For some reason now if I run the program with the release configuration it runs just fine. But if I switch over to the debug config, it gives me unresolved external symbol errors from the linker, on the freetype library functions.
Now I'm sure my C++ directories for both configurations are identical as I re-set them using the all-configurations tab in the solution settings. As well as this, so are both configurations "additional directories/additional dependancies settings", set identically in the same way.
The only difference I could find between the release and debug folders in the project folder, is the presence of a file in the debug folder called "vc100.idb", which is a minimum rebuild dependancy file. This looked promising, but removing it yielded no results, so I put it back.
Do you have any ideas of what could be causing this difference between the configurations compiling?
Worst come to worst, I can continue programming on the release config, but I'd rather not continue down this road as I'd really like to know the root of this problem.
Thanks in advance,
Guy
The errors:
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Glyph_To_Bitmap referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist#freetype##YAXPAUFT_FaceRec_##DIPAI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Get_Glyph referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist#freetype##YAXPAUFT_FaceRec_##DIPAI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Load_Glyph referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist#freetype##YAXPAUFT_FaceRec_##DIPAI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Get_Char_Index referenced in function "void __cdecl freetype::make_dlist(struct FT_FaceRec_ *,char,unsigned int,unsigned int *)" (?make_dlist#freetype##YAXPAUFT_FaceRec_##DIPAI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Done_FreeType referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init#font_data#freetype##QAEXPBDI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Done_Face referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init#font_data#freetype##QAEXPBDI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Set_Char_Size referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init#font_data#freetype##QAEXPBDI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_New_Face referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init#font_data#freetype##QAEXPBDI#Z)
1>freetype.obj : error LNK2019: unresolved external symbol _FT_Init_FreeType referenced in function "public: void __thiscall freetype::font_data::init(char const *,unsigned int)" (?init#font_data#freetype##QAEXPBDI#Z)
Edit: OK well this is strange. I've removed ALL of the freetype directory information rom the include and library directory setting in the release config, as well as the additional dependancies. And the released config version still works!
This is leading me to believe there is something missing (vs config-wise) from moving my files over.
I had the same problem.
I solved it by compiling the freetype( freetype-2.5.2\builds\windows\vc2010\freetype.sln ) solution for the x64 platform (or win32 if you use it).
You will get the .libs for this platform.
I am coming from Xcode, trying to compile a project in Visual Studio 2010, and I get the following errors:
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "struct _GUID __cdecl CLEyeGetCameraUUID(int)" (?CLEyeGetCameraUUID##YA?AU_GUID##H#Z) referenced in function "public: static int __cdecl ofxCLeye::listDevices(void)" (?listDevices#ofxCLeye##SAHXZ)
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "int __cdecl CLEyeGetCameraCount(void)" (?CLEyeGetCameraCount##YAHXZ) referenced in function "public: static int __cdecl ofxCLeye::listDevices(void)" (?listDevices#ofxCLeye##SAHXZ)
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraGetFrameDimensions(void *,int &,int &)" (?CLEyeCameraGetFrameDimensions##YA_NPAXAAH1#Z) referenced in function "public: void __thiscall ofxCLeye::grabFrame(void)" (?grabFrame#ofxCLeye##QAEXXZ)
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraGetFrame(void *,unsigned char *,int)" (?CLEyeCameraGetFrame##YA_NPAXPAEH#Z) referenced in function "public: void __thiscall ofxCLeye::grabFrame(void)" (?grabFrame#ofxCLeye##QAEXXZ)
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeDestroyCamera(void *)" (?CLEyeDestroyCamera##YA_NPAX#Z) referenced in function "public: virtual void __thiscall ofxCLeye::close(void)" (?close#ofxCLeye##UAEXXZ)
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraStop(void *)" (?CLEyeCameraStop##YA_NPAX#Z) referenced in function "public: virtual void __thiscall ofxCLeye::close(void)" (?close#ofxCLeye##UAEXXZ)
... etc etc...
2>bin\clEye_debug.exe : fatal error LNK1120: 10 unresolved externals
I imagine that the compiler is trying to link CLEyeMulticam.lib but not finding it. I think that I have configured it properly.
Could you point me with the needed steps to include a library in VS2010 ?
Thank you,
marc
Apologies if this is overly pedantic. If this is a pre-built library (not built as part of the project/solution) then make sure you
a) #include the correct header
b) #define any requisite macros
c) speciy additional .lib dependencies as shown below.
You will need to specify a fully qualifed path (d:\src\project\libs\camera.lib) unless the libary file is in the LIB environment variable.
In the Property Pages for your project, navigate to Configuration > Linker > Input and add the lib file to the Additional Dependencies setting. This applies to VC++ 2008, probably likewise to 2010.
I am creating an torrent application using libtorrent in VS 2008. I tried the example given in the link http://www.rasterbar.com/products/libtorrent/examples.html
BUt it is showing me these error....how to solve them?
Linking...
main.obj : error LNK2019: unresolved external symbol "public: __thiscall libtorrent::torrent_info::~torrent_info(void)" (??1torrent_info#libtorrent##QAE#XZ) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "public: __thiscall libtorrent::torrent_info::torrent_info(struct libtorrent::lazy_entry const &)" (??0torrent_info#libtorrent##QAE#ABUlazy_entry#1##Z) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "class std::basic_ostream > & __cdecl libtorrent::operator<<(class std::basic_ostream > &,struct libtorrent::lazy_entry const &)" (??6libtorrent##YAAAV?$basic_ostream#DU?$char_traits#D#std###std##AAV12#ABUlazy_entry#0##Z) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "int __cdecl libtorrent::lazy_bdecode(char const *,char const *,struct libtorrent::lazy_entry &,int)" (?lazy_bdecode#libtorrent##YAHPBD0AAUlazy_entry#1#H#Z) referenced in function _main
main.obj : error LNK2019: unresolved external symbol "public: void __thiscall libtorrent::lazy_entry::clear(void)" (?clear#lazy_entry#libtorrent##QAEXXZ) referenced in function "public: __thiscall libtorrent::lazy_entry::~lazy_entry(void)" (??1lazy_entry#libtorrent##QAE#XZ)
main.obj : error LNK2019: unresolved external symbol "void __cdecl libtorrent::to_hex(char const *,int,char *)" (?to_hex#libtorrent##YAXPBDHPAD#Z) referenced in function "class std::basic_ostream > & __cdecl libtorrent::operator<<(class std::basic_ostream > &,class libtorrent::big_number const &)" (??6libtorrent##YAAAV?$basic_ostream#DU?$char_traits#D#std###std##AAV12#ABVbig_number#0##Z)
main.obj : error LNK2019: unresolved external symbol "public: struct libtorrent::peer_request __thiscall libtorrent::file_storage::map_file(int,__int64,int)const " (?map_file#file_storage#libtorrent##QBE?AUpeer_request#2#H_JH#Z) referenced in function "public: struct libtorrent::peer_request __thiscall libtorrent::torrent_info::map_file(int,__int64,int)const " (?map_file#torrent_info#libtorrent##QBE?AUpeer_request#2#H_JH#Z)
C:\Users\photoshop3\Documents\Visual Studio 2008\Projects\Lib2\Debug\Lib2.exe : fatal error LNK1120: 7 unresolved externals
The .lib is not included in your project. Make sure you are linking it in;
Configuration Properties -> Linker -> Input -> Additional Dependencies
Another altnerative is to simply copy the .lib to your project folder but don't, it's bound to create problems later on.
Sometimes the .lib is not shipped with the library, so you need to compile it yourself.
The README will tell you this. If this is the case, they usually ship with a .sln file you can open and the just compile it into a .lib file which you then reference in your main application, as I wrote above
Have you added the path of header files in the "Configuration Properties" --> "C/C++“ --> "General" --> "Additional Include Directories"?
The link gives you only the sources (including headerfiles) of libtorrent. You should compile this sources to get a .lib file. Add this .lib file to your client:
Configuration Properties/Linker/Input -> Additional Dependencies: libtorrent-rasterbar.lib
The best starting point for compiling should be the README file.
public: isn't the unresolved symbol. It's just there because the linker it trying to tell you that (most) of the unresolved symbols are public member functions.
It looks like you've included the header for "libtorrent", but not linked to the "libtorrent" library.
You have probably not linked with the torrent library or specified the wrong path to it so that the linker cannot find it.
If the input libraries are of 32bit and your are using them in building a 64bit it might be one of the reasons
For me, I had it included in my project, but it turned out that it was a plugin that was designed to not create an instance of in my unit test.