MKL Linker error with some PARDISO subroutines - fortran

Some, but not all:
error LNK2019: unresolved external symbol PARDISO_CHKMATRIX_Z referenced in function GCS_SYSTEMSOLVE_mp_PARDISOSPARSESOLVER
error LNK2019: unresolved external symbol PARDISO_CHKVEC_Z referenced in function GCS_SYSTEMSOLVE_mp_PARDISOSPARSESOLVER
error LNK2019: unresolved external symbol PARDISO_PRINTSTATS_Z referenced in function GCS_SYSTEMSOLVE_mp_PARDISOSPARSESOLVER
The PARDISO solver call itself works fine. Actually, the subroutine calls are made in a project which itself can be compiled correctly. It is an exe project (a unit test project) that makes calls to that lib that pops up these linker errors.
I am using Intel Parallel Studio 2017. According to the Intel Linker Tool, everything should be in good order, although apparently I must be missing something.

Related

Including Lua in VS2015 C++ Project

I would like to integrate Lua into my current C++ application I build with VisualStudio 2015 (x64 mode).
I grabbed a simple Lua wrapper from here, and the Lua binaries for windows x64 from here (the lua-5.1.5_Win32_dll14_lib.zip one).
Next, I added the include and library path to the project preferences. Works so far in the IDE. However, when I try to compile the code it throws 24 errors (like these first two):
1>LuaScript.obj : error LNK2019: unresolved external symbol "lua_close" referenced in function ""public: __cdecl LuaScript::~LuaScript(void)" (??1LuaScript##QEAA#XZ)".
1>LuaScript.obj : error LNK2019: unresolved external symbol "lua_gettop" referenced in function ""public: void __cdecl LuaScript::clean(void)" (?clean#LuaScript##QEAAXXZ)".
which tells me next to nothing. Seems that the linker is unable to find the library but the includes are working and the path to library is set, too. Any suggestions what I might have missed or should look into? Any hint would be appreciated!

Unresolved external symbols linking to glew32s.lib

So this isn't the first time I have run into this problem, but the solutions that worked in the past don't seem to be working. I am currently receiving the following errors:
Error LNK1120 6 unresolved externals
Error LNK2019 unresolved external symbol __imp__glGetString#4 referenced in function _glewContextInit#0
Error LNK2019 unresolved external symbol __imp__wglGetCurrentDC#0 referenced in function _wglewGetExtension#4
Error LNK2019 unresolved external symbol __imp__wglGetProcAddress#4 referenced in function __glewInit_GL_3DFX_tbuffer
Error LNK2019 unresolved external symbol __imp__glClear#4 referenced in function "public: void __thiscall vortex::graphics::Window::clear(void)const " (?clear#Window#graphics#vortex##QBEXXZ)
Error LNK2019 unresolved external symbol __imp__glEnable#4 referenced in function "private: bool __thiscall vortex::graphics::Window::init(void)" (?init#Window#graphics#vortex##AAE_NXZ)
Error LNK2019 unresolved external symbol __imp__glViewport#16 referenced in function "void __cdecl vortex::graphics::windowResize(struct GLFWwindow *,int,int)" (?windowResize#graphics#vortex##YAXPAUGLFWwindow##HH#Z)
to give you a rundown of what I have tried, I have checked and rechecked the linking paths to the libraries, I have put the GLEW_STATIC preprocessor definition in the necessary section, I have redownloaded the libraries multiple times to make sure I was linking a Win32 library to the Win32 application, and I have no idea what to do now. It was working fine for awhile, and the above solutions would always fix this sort of error, but not this time. The sooner I can get a response the better, as this is a project that I wanna get more work done on soon. Thank you for any help you can give me.
Add OpenGL32.lib and glu32.lib to your linker inputs.
Add opengl32.lib to your linker inputs, and
add GLEW_STATIC to your Properties->C/C++->Preprocessor->Preprocessor Definitions
I had a very similar problem myself, and the solution for me was adding the glew32.dll to the folder, as well as adding #pragma comment(lib, "glew32.lib") and linking to it. The glew32.dll will refer to glew32.lib, so if you dont have it, it will give off similar linking errors.

how to compile Leptonica library for windows x64 bit using VS2010?

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.

Fix LNK2019: unresolved external symbol with freeglut

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

Migration from IBM VisualAge C++ 3.6.5 to VS 2010

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.