Coff2Omf generate error: reading new style import record - static-libraries

I have compiled the libvorbis static library with Visual Studio Express 2012, no errors there.
Then I convert the .lib file with coff2omf.exe so I can link it with C++ Builder XE7.
coff2omf.exe libvorbis_static.lib libvorbis.lib
But I get the following error (from coff2omf.exe):
ERROR: COFF error: libvorbis_static.lib
(coffread.cpp, 1561) : reading new style import record
I use coff2omf.exe version 1.2.0 included with C++ Builder XE7.
Is there a setting in Visual Studio Express 2012 project I can use to get an "older" coff header?
I'm not proficient with the Visual studio environment and don't know all the possible settings...

Related

Assimp linker error Visual Studio 2013 - invalid or corrupt file

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.

error LNK1104: cannot open file 'mfc100d.lib'

I compiled program that made for VS 2010 in VS 2013, I got this error.
I did change the tool to VS 2010 (V100) and add dependencies (both mfc100d.lib and mfc120d.lib).
I also set project defaults > Use of MFC > Use MFC in Shared DLL.
I'm trying to looking for mfc100d.lib but can't find that on my computer, I just have mfc100d.dll.
Do anyone has reference to related website, so I can download mfc100d.lib?
this is my error:
error LNK1104: cannot open file 'mfc100d.lib'
I use OpenCV 3.0 and VS Ultimate 2013.
Please help me.
Thank you.

intergrating qt4 ,vtk and visual studio2010

I have an integrated visual studio (2010) and Qt(4 visual studio addin) combination and just recently decided to add VTK5.I have managed to compile VTK as per the numerous instructions everywhere .However i tried to build a simple example from the VTK website but i get the Dll errors below.I have added include paths in visual studio but just can't compile .please direct me on what i should do next .
GeneratedFiles\Debug\moc_QVTKWidget.cpp(73): warning C4273: 'staticMetaObjectExtraData' : inconsistent dll linkage
E:/libs/vtk/vtk-5.10.1/VTK5.10.1/GUISupport/Qt/QVTKWidget.h(76) : see previous definition of 'private: static QMetaObjectExtraData const QVTKWidget::staticMetaObjectExtraData'
GeneratedFiles\Debug\moc_QVTKWidget.cpp(77): error C2491: 'QVTKWidget::staticMetaObject' : definition of dllimport static data member not allowed
I have been able to build a working environment following this guide, it is really helpful and well explained (and, as the more important thing, it uses VS2010, QT 4 and VTK 5): http://guitarcplusplus.blogspot.it/2013/02/itk-vtk-qt-on-window-7-64bit-and-visual.html.

How to link Static CUDA Runtime in VS2012?

I have been trying to use the static CUDA Runtime included in CUDA 5.5, but facing some problems.
Following are the results of linking cudart_static.lib in different IDEs:
Visual Studio 2012:
Linker fails with the following error:
error LNK2038: mismatch detected for '_MSC_VER': value '1600'
doesn't match value '1700' in kernel.cu.obj
Seems like the static CUDA runtime has been compiled using VS2010.
Visual Studio 2010:
No Error. Links successfully.
Visual Studio 2008:
Links successfully with the following series of warnings:
cudart_static.lib(cuda_*.obj) : warning LNK4229: invalid directive '/FAILIFMISMATCH:_MSC_VER=1600' encountered; ignored
Also, in all the IDEs, when running in DEBUG configuration the linking fails with following error:
error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value
'0' doesn't match value '2' in kernel.cu.obj
Questions:
How to link the static CUDA runtime in Visual Studio 2012?
How to link the same in DEBUG configuration?
Regarding your first question:
1.How to link the static CUDA runtime in Visual Studio 2012?
From the release notes:
"The new static version of the cudart library shipped with the CUDA 5.5 Release
Candidate (RC) on Windows will not work with Microsoft Visual Studio 2008 (VC9.0) nor with Microsoft Visual Studio 2012 (VC 11.0). Starting with CUDA 5.5, the nvcc compiler will link against the static version of the cudart library by default, so
in order for the CUDA 5.5 RC to correctly work with Microsoft Visual Studio 2008 or 2012, please use the --cudart=shared option to nvcc to force linkage against the shared version of the cudart library. If an application is not relying on the nvcc
capability to automatically link to the cudart library, and is instead explicitly linking against cudart.lib, then that application will continue to link correctly as well."
Usage of the static library on windows for VS2012 and/or VS2008 is therefore unsupported at this time.
Regarding your second question:
2.How to link the same in DEBUG configuration?
The issue with debug mode has to do with how the cudart static library was built. Normal practice would be to include two static libraries, one for debug mode and one for release mode. As a workaround, you can try something like this (in VS 2010):
Project Pages...Configuration Properties...C,C++...Preprocessor...Preprocessor Definitions
Add "_ITERATOR_DEBUG_LEVEL=0"
Your mileage may vary.

Setting up Kyoto Cabinet in Visual Studio

I am trying to setup Kyoto Cabinet in Visual Studio (VC++). I added the source files and the static library kyotocabinet.lib
However, it is giving me a link error LINK2005
By default, the library is built with linking to LIBCMT.LIB' by the/MT' option. I also tried rebuilding the library with the `/MD' option. I am still unable to do it.
Has someone tried to use it in Visual Studio?
I found the solution.
We just have to create a new empty C++ project in Visual Studio.
Add the header files and the static library from Kyoto Cabinet Win32 Package
Set the Runtime Library from Properties -> Configuration Properties -> Code Generation to [/MT]

Resources