screenshot of the error
I am trying to recompile a Fortran projects using Intel Visual Fortran (Parallel Studio XE 2017) with MS Visual Studio 2013. The code uses a couple of external .lib files in the Fortran script which are:-
use m21df
use Mzcalendar
I have the .lib with me, but i am having problem to link them. When i compile the project, it gave me error #7002: Error in opening the compiled module file. Check INCLUDE paths.
What can I do to fix this problem whereby make my script recognizes the .lib files?
Related
I am trying to make assimp work with Visual Studio 2013, but I always get this error:
Error 1 LNK1107: invalid or corrupt file: cannot read at 0x2F0
I followed all the steps here -> Assimp model loading library install/linking troubles
Built assimp from source using cmake, Visual Studio 12 2013 and put the includes and generated dll file in the solution folder. Added the paths in visual studio VC++ Directories (Include, library), C++ (Additional include dirs), Linker (Additional Library dirs, Additional Dependencies).
Am I missing something?
In addition, can someone suggest some other tools to read obj files and load vertex/index/texture buffers directly from the file?
You need to link against the assimp.lib, not against the assimp.dll. The lib is used to say your aplication that it has to load the dll when starting your application.
I have a project in visual c++ where I am referring some external DLL.
I have already included the lib directory in linker section and mention it in the input section of the linker and also included the same in c/c++ General Additional Include Directories section.
Thus the project compiles successfully but whenever I try to run it; it fails with an error "Application was unable to start correctly" but if I see the output section it seems everything is loaded correctly but against that particular Dll it says that "Cannot find or open the PDB file".
How to fix this error so that I can run my program. It is an MFC program running in Visual Studio 2010.
when I run the program through the Dependency Walker, most of the API-MS-WIN-CORE-HEAP, FILE, and EXT-MS-WIN-SESSION USERMGR -l1-1-0.dll many similar to this are unavailable. I even tried to repair the visual studio it didn't work. Is there any idea how to go about it
0x0000007b sounds familiar to me.
Most likely that is due to 32/64 bit library mixture you are linking with.
Either you are building for x64 and linking with a win32 external library or vice versa.
In your Visual Studio project settings separately configure platform architectures you are compiling for and then you can choose the profile which you are actually compiling for.
I need to use some library file that have been build using Visual Studio 2010 Professional (MSVCRT2010 compiler?!) and I am having trouble building my s-functions in another host machine. My target host machine does not have Visual Studio so MATLAB cannot pickup the C++ compiler. Also, LCC (MATLAB's native) compiler is probably different. How can I manage to do that without causing minimum hassle?
I can think about one thing - retargetting the library to be cross-compiler friendly. I have already done that when I got the library from my legacy code pool (UNIX GNU platform) and it was supposed to be running okay with any compiler after my retargetting. However, it has come back to bit me.
Is it something regarding redistributable VS files? or am I driving myself insane?
The error msg I am getting is:
Writing library for y_ing_sl_ver.mexw32
File c_src_~1\lg_com~1\y_ing.obj contains unknown section .rtc$TMZ.
.text section assumed
File c_src_~1\lg_com~1\y_ing.obj contains unknown section .rtc$IMZ.
.text section assumed
c_src_~1\lg_com~1\ymginteg.obj .rtc$TMZ: undefined reference to '__RTC_Shutdown'
c_src_~1\lg_com~1\ymginteg.obj .rtc$IMZ: undefined reference to '__RTC_InitBase'
C:\PROGRA~2\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'y_ing_sl_ver.mexw32' failed.
I've been sent a sample app for a newly minted SDK, and I can't compile it - it won't compile at all in Visual Studio Express for reasons of ATL, and that seems to be the only version of VS 2010 that Microsoft still makes available. So I'm trying to compile it in VS 2012 Professional, but it gives me error LNK2038. From what I can gather e.g. from this thread, the problem is down to trying to use .lib files compiled for 2010 in the 2012 version. Since I'm not the one who compiled the .lib, and I don't have the code for it, and VS 2010 is inaccessible, I'm really not sure what to do about this unless the original authors recompile it. Any suggestions? Something basic I'm missing? Many thanks for any help.
Library files cannot be reused across different versions of the compiler. You will need to do one of the following:
Compile your project with the same version of the compiler used for creating the library files you have.
Obtain new library files from the owner of the code, compiled using the same compiler you are now using.
Obtain the source code for the libraries, and compile new versions of them yourself.
Rewrite the code you own to not depend on the libraries you cannot control, since your build environment does not allow for their use.
I downloaded source code of OpenCV and built statically (no DLL option) by Visual Studio (in release mode) so that I can create standalone executables. It works perfectly fine with Visual Studio in release mode with \MT flag (runtime library : Multi-threaded). Note that I have errors if I compile\link in debug mode or change \MT flag such as \MD: Multi-threaded DLL)
Now, I want to use it with MEX. I changed \MD with \MT in mex specifications(mexopt.bat file) and mex compiles\links without any error. However, when I execute MEX function, it breaks MATLAB and shows error message: "Segmentation violation detected".
I utilized OpenCV with MEX functions before. But, It was a dynamic compilation.
I think I can solve this problem, if I modify Visual Studio compiler\linker flags in mexopt.bat file.
Can you help me ?