cannot open file 'libboost_date_time-vc90-mt-gd-1_36.lib - boost

I dont have visual studio 2008 installed.I am using 2012 and i rebuild this projects by cleaning.I checked the project settings and controlled the additional libraries and unfortunately I couldnt find any lib link has this name...in project just .h files of date_time are used but no lib linking. I configured new version of boost but STILL it wants this lib ? so is there any way I can solve this problem ?

With Visual Studio, boost use an auto linking system.
Special code in Boost header files detects your compiler options and
uses that information to encode the name of the correct library into
your object files; the linker selects the library with that name from
the directories you've told it to search.
date_time is one of boost modules that need a library (which is not header only).
So, you have to build them, using bjam (and --toolset=msvc-9.0), or retrieve them already built for your system.
Other option: disable auto linking. Just define
BOOST_DATE_TIME_NO_LIB
And link manually.

Related

I need to create a sample video to visualize how HaarCascade works on OpenCV (code do not works)

How are you?
I am trying to create a video like this:
https://youtu.be/L0JkjIwz2II
or like this:
https://youtu.be/hPCTwxF0qf4
I am trying to getting this code working:
https://github.com/Tubeliar/HAARCascadeVisualization
I am using Visual Studio 2017 on Windows 10.
I have added correctly the include directory and the library directory.
I created it as a console application.
I added the #include "stdafx.h" at the start of the main file.
This are the errors that Microsoft Visual Studio show to me:
Can you help me solve this?
There is anything that I should know for making this work correctly?
Thank you to everyone,
Andrea
Those errors are as has been noted indeed linker errors. If the compiler does not complain that means you have you include paths set up correctly, so you have won half the battle.
For linker errors you can try these things:
Make sure your *.lib files are built for the same target you're building your own project for.
If you use NuGet then you can look in the /packages folder of your project. Browse down to /packages/[package name]/build/native/lib/[architecture]/. There you will find folders like v120 or v140. For Visual Studio 2017 they need to be v141. If they are missing then you can tell VS to target the older platform (project properties -> general -> platform toolset)
If you've built the libraries yourself then maybe you did that similarly targeting a different platform? Try building the OpenCV library again and make sure the target is set to v141 (or whatever you want to use).
Make sure the linker can find your libraries. If you're using NuGet this step isn't necessary but if you built the library yourself or if you downloaded a prebuilt one then go into project settings and:
Go to VC++ directories -> Library Directories, edit that value and make sure the folder that contains the *.lib files is in there.
Go to Linker -> Input -> Additional Dependencies, edit it and put in all the *.lib files. Just their names, not full paths. In your case you'd just put opencv_world331d.lib there.
Be aware that any of the above settings need to be done for each configuration. Usually there is a x86 and x64 architecture combined with debug or release configuration. If you switch any of these you'd have to check the above steps again. This is a bit of a hassle so you're better off defining a property sheet once which you can then reuse every time you do a OpenCV project. There was a tutorial for this in OpenCV 2.4's documentation, and some people have made premade ones.

LLVM: How to get up and running and use files in include/llvm/?

I've downloaded the binary for Windows (here: http://llvm.org/builds/), but this doesn't include any of the files, e.g., "llvm/IRReader/IRReader.h", that many tutorials use.
Now, I've downloaded the LLVM source (here: http://releases.llvm.org/download.html), but instructing Visual Studio to look up include files in "include/llvm" results in lots of errors: header files cannot be opened, because they have a cmake suffix.
How do I get up and running fast without too much configuration?
You will need to run CMake before you can do anything. That will create Visual Studio solution files, which you can then use the build the LLVM binary files from sources. Only after you have build the binary files, you will be able to develop further applications linking to LLVM.
There is a platform independent guide here, also there used to be a windows specific guide too, which I could look for later.
http://llvm.org/docs/CMake.html
For a first-time user of CMake I would recommend CMake-GUI, as it is much less of a hassle to use.
I think for starters one can use default settings. Just make sure to select the correct Version of Visual Studio, otherwise you might end up with incompatible solution files

cmake: boost dependencies and visual studio (or any platform with automatic link features)

What is the recommended way to setup cmake boost dependencies with code that aims to be compiled with visual studio (or any other platform that features by default automatic linking on boost)?
The problems comes at the link process, boost under visual studio automatically adds the library dependencies with the default naming convention, but you still have to manually add the LIBPATH, this under cmake is something like link_directories(${Boost_LIBRARY_DIRS}) but AFAIK using link_directories is discouraged.
If I use target_link_libraries(foo ${Boost_LIBRARIES}) the problem is still there because this only adds additional absolute filenames and does not prevent the automatic linking process to add the relative libs and the linker misses to find them without the directory.
So what is the best practise here, to disable the automatic link features or is there any other way?
Disable (or don't enable - doesn't it require you to set a define?) the automatic linking.

Statically linking dependencies using Visual Studio 2010

I have a VST plug-in which I have built on Windows using Visual Studio. It depends on two libraries (FFTW and Speex). I am able to link these to the project and it compiles - so far so good.
However, the problem is that I cannot get the plug-in to compile without requiring the .dll files at runtime - I have looked elsewhere on this site, found suggestions, and tried the following in Visual Studio:
Ensuring Configuration->Linker->Input->Additional Dependencies contain the .lib files I am looking to link
Ensuring Configuration->Linker->Additional Library Directories contain the directories of my .lib files
Making sure Configuration->C/C++->Code Generation->Runtime Library is set to MultiThreaded /MT
Yet, when I check using Dependency Walker (http://www.dependencywalker.com/), my plug-in still requires the .dll files.
The host with which I am looking to use the plug-in cannot load the VST if it has .dll dependencies (I have tried another host and it works fine, as long as the .dll files are in the same directory as the plug-in .dll file).
I would really like this plug-in to link statically to these libraries, can anyone help?
Thanks!
Adam
p.s. - as a check, I made a simple plug-in with no dependencies and compiled it and this loads in the host no problem

Partial linking of object files with Visual Studio

We have a project which has a multistage build system: it's split into modules consisting of multiple source files, and each module is compiled and partially linked into a single object file. Then these object files are linked together into the final program. (This approach is required for non-technical reasons.)
Currently we use gcc and binutils for this, and it's very easy there: ld -r will partially link multiple object files into one.
Unfortunately, we've now been faced with a platform for which there is no gcc/binutils support, only Visual C support. So I've been reworking the build system to use the native Microsoft tools. Unfortunately I have not yet found a way to do a partial link --- link.exe seems to only support outputting EXE or DLL files.
Does anyone know of a way to do a partial link in Visual Studio?
Note that .LIB libraries are not adequate. Neither is incremental linking. And this is all happening from the command line.

Resources