msvc12

MSVC 12 Show where a library is being required

烈酒焚心 提交于 2019-12-11 12:41:51
问题 TL;DR Is there a flag or something that will tell msvc to print out which library/object file requires a given library? say I get an error message like: LNK1104 fail to open file: boost_thread-vc120-mt-gd-1_56.lib I expect this because I haven't told msvc where to find that. But, let's say I want to know why do I need that? . In other words, let's say I'm linking against foo.lib bar.lib and I've got a bunch of code in my project. Will msvc show me whether it's foo.lib , bar.lib , or my own

Why sleep_for calls FreeLibrary?

心已入冬 提交于 2019-12-11 11:47:13
问题 I'm shocked to trace this simple code: #include <thread> void foo() { for (int i = 0; i < 1000000; ++i) { std::this_thread::sleep_for(std::chrono::nanoseconds(1)); } } int main() { std::thread t(foo); t.join(); } Guess what ? sleep_for calls FreeLibrary everytime ! kernel32.dll!_FreeLibraryStub@4() msvcr120d.dll!Concurrency::details::DeleteAsyncTimerAndUnloadLibrary(_TP_TIMER * timer) Line 707 msvcr120d.dll!Concurrency::details::_Timer::_Stop() Line 111 msvcr120d.dll!Concurrency::details::

Can't assign string literal to boxed std::string vector

不羁的心 提交于 2019-12-09 08:28:29
问题 This is a simplified version of my type system: #include <string> #include <vector> template<typename T> class Box { public: Box(const T& value) : _value(value) {}; private: T _value; /* ... */ }; typedef Box<int> Int; typedef Box<double> Double; typedef Box<std::string> String; int main(int argc, char* argv[]) { String a("abc"); std::vector<String> b = { std::string("abc"), std::string("def") }; // error C2664: 'Box<std::string>::Box(const Box<std::string> &)' : cannot convert argument 1

Is it possible to build ffmpeg x64 on Windows?

时光怂恿深爱的人放手 提交于 2019-12-07 12:41:13
问题 The real answer is probably "no", but still, just to double check. Has anyone ever been able to build ffmpeg x64 on Windows (VS2013 or VS2015)? I know it is not possible with publicly available sources without heavy modifications. However, if somebody did it and if he is willing to share a few tips... Edit: It is interesting how most of the required x64 tools for running the "configure" are distributed without dependencies and it is impossible to get them anywhere. Looks like a professional

C++ class not recognized by Python 3 as a module via Boost.Python Embedding

北城以北 提交于 2019-12-06 04:37:27
问题 The following example from Boost.Python v1.56 shows how to embed the Python 3.4.2 interpreter into your own application. Unfortunately that example does not work out of the box on my configuration with MSVC2013 under Windows 8.1. And I have not found 1 working complete example about embedding, at least none that is younger than 10 years or so. I receive the following error running it: ImportError: 'embedded_hello' is not a built-in module The code is here: http://pastebin.com/shTtdxT8 Any

Is it possible to build ffmpeg x64 on Windows?

ぐ巨炮叔叔 提交于 2019-12-05 22:37:53
The real answer is probably "no", but still, just to double check. Has anyone ever been able to build ffmpeg x64 on Windows (VS2013 or VS2015)? I know it is not possible with publicly available sources without heavy modifications. However, if somebody did it and if he is willing to share a few tips... Edit: It is interesting how most of the required x64 tools for running the "configure" are distributed without dependencies and it is impossible to get them anywhere. Looks like a professional trolling. Edit2: There are thousands of errors like this: fatal error C1083: Cannot open include file:

“Function has no address” despite disabled optimization (/Od)

限于喜欢 提交于 2019-12-04 23:49:56
During debug in MSVC 2012, I am attempting to call some functions from the Watch window in order to dump data to files. However, I keep getting this error: Function Matrix::Save has no address, possibly due to compiler optimizations. The class Matrix is located in my own external library. A quick check showed that none of the methods in external libraries have addresses and all attempts to call them from Watch return this error, except for those which are defined in the header files. The methods in the main project all have addresses regardless of where they are defined. Optimization is

Compiling gcc code in Visual Studio causes error C3646: '__attribute__': unknown override specifier

回眸只為那壹抹淺笑 提交于 2019-12-04 04:57:18
问题 I am getting the following error: error C3646: '__attribute__': unknown override specifier Code: LEMUR_PREALIGN char _stack[ sizeof(_Type) * _Count ] LEMUR_POSTALIGN; Complete error: 1>c:\program files\indri\indri 5.9\include\indri\greedy_vector(52): error C3646: '__attribute__': unknown override specifier Additional info: I am trying to use indri.lib in Visual Studio project. 回答1: The __attribute__ command is a compiler specific command to gcc. And it is used on line 52 of this file with the

How to fix 'error MSB4018: The “VCMessage” task failed unexpectedly' in Visual Studio 2013

淺唱寂寞╮ 提交于 2019-12-04 00:48:28
问题 This is what I see: 1>------ Build started: Project: xxx (xxx\xxx), Configuration: Debug Win32 ------ 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018: The "VCMessage" task failed unexpectedly. 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB4018: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. 1>C:

Can't assign string literal to boxed std::string vector

冷暖自知 提交于 2019-12-03 12:00:27
This is a simplified version of my type system: #include <string> #include <vector> template<typename T> class Box { public: Box(const T& value) : _value(value) {}; private: T _value; /* ... */ }; typedef Box<int> Int; typedef Box<double> Double; typedef Box<std::string> String; int main(int argc, char* argv[]) { String a("abc"); std::vector<String> b = { std::string("abc"), std::string("def") }; // error C2664: 'Box<std::string>::Box(const Box<std::string> &)' : cannot convert argument 1 from 'const char' to 'const std::string &' std::vector<String> c = { "abc", "def" }; } While a and b