visual-c++-2010

How to link Lua in Microsoft Visual C++.2010 Express?

寵の児 提交于 2019-12-11 11:07:25
问题 I am trying to write C++ classes/functions which can be accessed from Lua. I need to export the C++ library as dll files. I'm using Microsoft Visual C++.2010 Express So I create a project and add the require .cpp files and .h files Now when I try to build, the following error occurs. mylib.obj : error LNK2019: unresolved external symbol _lua_settop referenced in function "void __cdecl g_initializePlugin(struct lua_State *)" (?g_initializePlugin@@YAXPAUlua_State@@@Z) Similar errors occur for

C++ and OpenCV in Visual Studio exited with code -1 (0xffffffff) error

妖精的绣舞 提交于 2019-12-11 08:29:46
问题 My code builds fine but when I debug this is what I get: 'Proj_OpenCV.exe': Loaded 'C:\Users\Saher\Documents\Visual Studio 2008\Projects\Proj_OpenCV\Debug\Proj_OpenCV.exe', Symbols loaded. 'Proj_OpenCV.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll' 'Proj_OpenCV.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll' 'Proj_OpenCV.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll' 'Proj_OpenCV.exe': Loaded 'C:\Users\Saher\Downloads\OpenCV2.3\build\x86\vc9\bin\opencv_core230.dll' 'Proj_OpenCV.exe': Loaded

How can I detect if any key is pressed by the user in C++ (console)?

孤街浪徒 提交于 2019-12-11 04:09:32
问题 I am writing a C++ CLI application how can I detect if any key is pressed by the user. I've seen that in c# but how can it be implement in c++ while(1) { while(/* code to check if any key is pressed*/) { //rest of the code // sleep function } } Hint: like in CLI games to move or to take certain action when a key is pressed or don't do any thing if no input is given. 回答1: On windows at least you could use GetKeyState 回答2: we can use _kbhit() function in c++. _kbhit is equal to 1 if any key is

resource (.rc) file include header ignores visual studio project include paths

自闭症网瘾萝莉.ら 提交于 2019-12-11 01:10:34
问题 I'm trying to include a header file in a resource file (.rc). The path is something like "folder_a/sub_folder_b/file_name.h" The folder which folder_a is in is included in the project's c++ include directory. When I write the same #include directive in a .cpp file in the same project it compiles properly, but for the .rc file VS cannot find the header file. In the source editor window, when I right click the #include directive and choose 'open document', the popup error which states that it

What's missing from Visual C++ 2010 Express? [duplicate]

无人久伴 提交于 2019-12-10 12:48:39
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: What is “missing” in the Visual Studio Express Editions? Specifically for 2010, specifically for C++... what's missing Vs Professional/Premium (annoying the standard version is now named Professional)? 回答1: http://www.microsoft.com/express/Windows/ Express versions don't have: Plugins Class Designer Code Analysis Creating 64-bit programs Creating for Itanium processors Creating for Windows Mobile Creating for

Debugging Visual Studio 2010 DLL Project

旧时模样 提交于 2019-12-10 12:26:40
问题 I'm trying to debug a C/C++ native DLL project from Visual Studio 2010. I'm attempting to follow these instructions: http://msdn.microsoft.com/en-us/library/c91k1xcf(v=VS.100).aspx I want to use the built-in debugger and be able to step code, examine structures, etc. as I would do with a regular .exe project. The instructions on the page above describe a Debugging category under Configuration Properties which I do not see. http://img707.imageshack.us/img707/4402/lalasz.png Just pressing F5 to

How can an Empty Visual C++ project be created programmatically?

南笙酒味 提交于 2019-12-10 10:59:19
问题 I wanted to know how to use the template for an Empty Visual C++ project to programmatically create a new solution with this empty project. The code (C#) I have right now is: string VSProgID = "VisualStudio.Solution.10.0"; Type solnObjType = System.Type.GetTypeFromProgID(VSProgID, true); Solution4 soln = (Solution4) System.Activator.CreateInstance(solnObjType, true); soln.Create(@"C:\NewSoln", "New"); soln.SaveAs(@"C:\NewSoln\New.sln"); string emptyVCProjPath = soln.GetProjectTemplate(

TR1 regex: capture groups?

点点圈 提交于 2019-12-10 10:12:48
问题 I am using TR1 Regular Expressions (for VS2010) and what I'm trying to do is search for specific pattern for a group called "name", and another pattern for a group called "value". I think what I want is called a capture group , but I'm not sure if that's the right terminology. I want to assign matches to the pattern "[^:\r\n]+):\s" to a list of matches called "name", and matches of the pattern "[^\r\n]+)\r\n)+" to a list of matches called "value". The regex pattern I have so far is string

MSVC fails with compiler errors without compiling any sources

旧城冷巷雨未停 提交于 2019-12-10 10:11:28
问题 All source files seem to have compiled fine. However, since I achieved that, I am getting a new compiler error: 1>------ Erstellen gestartet: Projekt: OpenLieroX, Konfiguration: Debug Win32 ------ 1>Der Buildvorgang wurde am 29.03.2012 23:57:39 gestartet. 1>InitializeBuildStatus: 1> Aktualisieren des Timestamps von "Debug\OpenLieroX.unsuccessfulbuild". 1>ClCompile: 1> Alle Ausgaben sind aktuell. 1> Alle Ausgaben sind aktuell. 1> Alle Ausgaben sind aktuell. 1> Alle Ausgaben sind aktuell. 1>

Closure and nested lambdas in C++0x

╄→гoц情女王★ 提交于 2019-12-09 14:25:38
问题 Using C++0x, how do I capture a variable when I have a lambda within a lambda? For example: std::vector<int> c1; int v = 10; <--- I want to capture this variable std::for_each( c1.begin(), c1.end(), [v](int num) <--- This is fine... { std::vector<int> c2; std::for_each( c2.begin(), c2.end(), [v](int num) <--- error on this line, how do I recapture v? { // Do something }); }); 回答1: std::for_each( c1.begin(), c1.end(), [&](int num) { std::vector<int> c2; int& v_ = v; std::for_each( c2.begin(),