I can build Leptonica libraries(DLL) for 32-bit windows using VS2010 by the help of http://www.leptonica.com/vs2008doc/building-liblept.html .
But when I change the Target into x64, I got below errors. How can I resolve this? Is it possible to compile the 32-bit source files in 64 bit?
2>tiffio.obj : error LNK2019: unresolved external symbol TIFFReadRGBAImageOriented referenced in function pixReadFromTiffStream
2>tiffio.obj : error LNK2019: unresolved external symbol TIFFReadScanline referenced in function pixReadFromTiffStream
2>tiffio.obj : error LNK2019: unresolved external symbol TIFFScanlineSize referenced in function pixReadFromTiffStream
2>tiffio.obj : error LNK2019: unresolved external symbol TIFFGetField referenced in function pixReadFromTiffStream
You are most likely missing the x64 libraries or you have not correctly placed the x64 libraries where the linker is looking for them.
Related
i have found some source file online and the individual responsible for it hasn't reply back, i need to know how does one go about finding this particular libraries if one was to need in the near future?
in processing its easy you just go to the library download manager and type the name of that library.
is there a way to do this in Visual studios?
below you can see what i think i need to fix my issue.
#include<opencv/cvaux.h>// in need of it
#include<opencv/cxcore.h>//in need of it
this is why i think i need those files above,
ERRORS:
Error 4 error LNK2019: unresolved external symbol cvReleaseMemStorage
referenced in function
main
Error 2 error LNK2019: unresolved external symbol cvInRangeS
referenced in function
main
Error 5 error LNK2019: unresolved external symbol cvGetSeqElem
referenced in function
main
Error 3 error LNK2019: unresolved external symbol cvCreateMemStorage
referenced in function
main
Error 1 error LNK2019: unresolved external symbol cvCreateImage
referenced in function
main
Error 6 error LNK2019: unresolved external symbol cvCircle referenced
in function
main
Error 7 error LNK1120: 6 unresolved
externals
1>Source.obj : error LNK2019: unresolved external symbol cvCreateMemStorage referenced in function main
1>Source.obj : error LNK2019: unresolved external symbol cvReleaseMemStorage referenced in function main
1>Source.obj : error LNK2019: unresolved external symbol cvGetSeqElem referenced in function main
1>Source.obj : error LNK2019: unresolved external symbol cvCircle referenced in function main
the funny thing is that there's no squiggly red lines in the code telling me that this! is whats wrong, this is why im guessing that the problem is cuz of the lacking of those files.
For starting the development process using libraries like OpenCV or OpenGL,you need to install some packages and do a bunch of configurations on your Visual Studio.From here you can download the missing packages for windows,you can also have a Quick start on the website which will get you on the path for beginning,to be more specific here is a complete guide of building OpenCV apps inside Visual Studio
Using this manual, I tried to get freeglut OpenGL application to compile on my computer. This means I:
Copied files from freeglut archive to MS program files folder
Specified freeglut.lib in additional dependencies
Set explicitly the freeglut.lib path in libraries folders
But all takes no effect. The C++ header files are found right, but the libraries not - so I get these errors:
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutMainLoop#0 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutSpecialFunc#4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol "void __cdecl specialKeys(int,int,int)" (?specialKeys##YAXHHH#Z) referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutDisplayFunc#4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutInitDisplayMode#4 referenced in function _wmain
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp____glutInitWithExit#12 referenced in function _glutInit_ATEXIT_HACK#8
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit#8 referenced in function _glutCreateWindow_ATEXIT_HACK#4
1>OpenglTest.obj : error LNK2019: unresolved external symbol __imp__glutSwapBuffers#0 referenced in function "void __cdecl display(void)" (?display##YAXXZ)
So my questions:
Could you guess what may be wrong? (not easy, but I cannot find this out obviously)
Is there some other manual google didn't find, but better than the one I used?
Is there some other archive I should download?
My C++ code comes from here. All functions are well found in freeglut header files. Just the libraries are missing.
This seems like a C vs C++ linkage issue. You are compiling a C source code from there as a C++ code (maybe you saved it with C++ specific extensions and the compiler assumed it is C++).
C++ will mangle function names. For example __imp__glutMainLoop#0 is most probabley a call to glutMainLoop in your source code.
The library must have been from a C code. Hence it will have a non mangled version of the function simply as glutMainLoop. That's why it can not be found.
The solution is either compile your code as C code or use extern "C".
EDIT: Some Links on how to deal with with C/C++ linkage issues (Moved from the comments).
http://www.thegeekstuff.com/2013/01/mix-c-and-cpp/
Combining C++ and C - how does #ifdef __cplusplus work?
http://www.parashift.com/c++-faq-lite/c-calls-cpp.html
We're in the process of migrating 32-bit C++ application to 64-bit application (VS 2010). This application was developed 10 years back with IBM VisualAge C++ 3.6.5 for Windows. Since IBM has stopped support of this compiler, we're facing issues while migrating it to VS 2010.
This is mostly because of some missing libraries.
Sample errors:
error LNK2019: unresolved external symbol __uopen referenced in function "int __cdecl allocate_heap_storage_(void)" (?allocate_heap_storage##YAHXZ)
error LNK2019: unresolved external symbol __ucreate referenced in function "int __cdecl allocate_heap_storage_(void)" (?allocate_heap_storage##YAHXZ)
error LNK2019: unresolved external symbol __udestory referenced in function "int __cdecl deallocate_heap_storage_(void)" (?deallocate_heap_storage##YAHXXZ)
error LNK2019: unresolved external symbol __uclose referenced in function "int __cdecl deallocate_heap_storage_(void)" (?deallocate_heap_storage##YAHXXZ)
error LNK2019: unresolved external symbol __umalloc referenced in function "int __cdecl alloc_share_mem_(int,int)" (?alloc_share_mem#YAPAXHH#Z)
The above functions are defined in umalloc.h but we are missing the definitions.
How can we resolve this?
For the errors above, these function "_ucreate",_udestory , _uclose,_umalloc" are not found when linking, I think these functions were in the run time libraries provided by Visual Age. if you can find the lib files of the these run time libraries, you can put them in the input of link, it may pass the compiling phase, but may fail to launch.
One suggestion here is to replace the functions above with windows functions. All the functions above are related with memory allocations.
I am trying to build an OpenCV program which uses SURF matching algorithm, the code is in the following link :
http://feelmare.blogspot.ro/2011/10/sift-matching-c-source-code-using.html
However, I am obtaining 2 errors regarding some external symbols : _cvExtractSurf and _cvSURFParams.
error LNK2019: unresolved external symbol _cvExtractSURF referenced in function "public: bool __thiscall CMareMatchingClass::ExtractBGsurf(struct _IplImage *)" (?ExtractBGsurf#CMareMatchingClass##QAE_NPAU_IplImage###Z)
error LNK2019: unresolved external symbol _cvSURFParams referenced in function "public: __thiscall CMareMatchingClass::CMareMatchingClass(void)" (??0CMareMatchingClass##QAE#XZ)
Do you know how can I solve this errors? I am running the code by using opencv 2.3.0 in visual studio 2010 in Windows 7 - 64 bit.
You didn't link a needed library - try to link all OpenCV libraries in project settings. See documentation.
I am getting the following LINK error while compiling my C++ solution:
error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8
referenced in function "protected: XYX()
The symbol "Direct3DCreate9Ex' is defined in "ddraw.h" header file found in "C:\Program Files\Microsoft SDKs\Windows\v7.0\Include". And verified that the header file "ddraw.h" is present in this location. Also I have included this path in VS settings "Tools-->Options-->VC++ Directories -> Includes".
But still I am getting the link error as "error LNK2019: unresolved external symbol _Direct3DCreate9Ex#8 referenced in function "protected: XYX()" ".
Can anyone kindly help me in getting rid of this link error while compiling my C++ solution.
I am using VS 2008 on 64 bit Win7.
Thanks in advance.
Based on reference page for Direct3DCreate9Ex you need to link with D3D9.lib.