visual-studio-2008

Linker problem with ZeroMQ and Visual C++ 2008

走远了吗. 提交于 2019-12-23 12:58:18
问题 I'm having a problem trying to use ZeroMQ in my new application. Please note: I have no problem downloading and building ZeroMQ itself. I downloaded the ZeroMQ ZIP file, opened the project/solution file in Visual Studio/C++ 2008 and built the ZeroMQ library just fine. The /lib directory of the ZeroMQ install folder contains the .lib, .dll, and other files, so all is well there as far as I know. My problem is that I am trying to build a simple project consisting of the HelloWorld server

What should I change when the compiler tells me to “Consider app.config remapping” when I have no app.config file?

喜欢而已 提交于 2019-12-23 12:47:55
问题 In compiling a solution ported from .NET 1.1 in VS2003 to .NET 3.5 in VS2008, I get several suggestions, of which this one is representative: Consider app.config remapping of assembly "System.Windows.Forms, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "1.0.5000.0" [] to Version "2.0.0.0" [C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\System.Windows.Forms.dll] to solve conflict and get rid of warning. Neither project in the

How can I overcome the “error C2100: illegal indirection” when accessing the contents of a void* in VS2008

戏子无情 提交于 2019-12-23 12:47:21
问题 I have a C application that I've created in VS2008. I am creating a mock creation function that overrides function references in a struct. However if I try and do this in a straight forward fashion with something like: void *ptr = &(*env)->GetVersion; *ptr = <address of new function> then I get a "error C2100: illegal indirection" error as *ptr, when ptr is a void * seems to be a banned construct. I can get around it by using a int/long pointer as well, mapping that to the same address and

Macro expansion in Visual Studio macro or add in

你说的曾经没有我的故事 提交于 2019-12-23 12:36:47
问题 I have a VS project with an IntermediateDirectory like this: "....\temp\$(SolutionName)\$(ProjectName)". I can read this value using a macro or add in, however, I would need the actual directory to manipulate files there. Right now, I manually replace the "$(SolutionName)" and "$(ProjectName)" with the respective values, which works fine but might become complicated when different macros or even user macros from property sheets are used. So my question is: Does the Visual Studio API have a

Can intellisense be enabled in VS2008 within preprocessor directive blocks like #ifndef … #endif

混江龙づ霸主 提交于 2019-12-23 12:31:39
问题 While working within C++ libraries, I've noticed that I am not granted any intellisense while inside directive blocks like "#ifndef CLIENT_DLL ... #endif". This is obviously due to the fact that "CLIENT_DLL" has been defined. I realize that I can work around this by simply commenting out the directives. Are there any intellisense options that will enable intellisense regardless of directive evaluation? 回答1: By getting what you want, you would lose a lot. Visual C++ IntelliSense is based on a

C++ (Visual Studio), Can't write the number '10' to file, all other numbers working?

本小妞迷上赌 提交于 2019-12-23 12:25:16
问题 I have a bit of a weird problem here! I am trying to write the color table for a 8 bit windows 3.x bitmap file. I just want the file to be greyscale, so i am trying to write bbb0, ggg0, rrr0 256 times where r=g=b=1..256 //write greyscale color table for (int i = 255; i >= 0; i--) { writeS = (unsigned short)i; outfile.write ((char*)&writeS,sizeof(char)); // b outfile.write ((char*)&writeS,sizeof(char)); // g outfile.write ((char*)&writeS,sizeof(char)); // r writeS = 0; outfile.write ((char*)

SmartDevice CAB “is not a valid Windows CE Setup file”

拥有回忆 提交于 2019-12-23 12:22:43
问题 (This can be considered a follow-up on my question here.) After successfully building a CAB setup file for my handheld WCE5 device, (a Datalogic Memor laserscanner) I went on to try and install it. However, upon starting the CAB, the device throws me the following error message: The file "\Setup.CAB" is not a valid Windows CE Setup file I have no idea why it's saying this, especially since I made the CAB file using VS08's "Smart Device CAB Project" template. Is there some setting I missed

TreeView CSS Friendly Output? Control Adapters? ASP.NET 3.5

£可爱£侵袭症+ 提交于 2019-12-23 12:19:44
问题 I want my TreeView control to output <ul><li> tags instead of <tables> . What is the best way to do this. I heard about the CSS Control Adapters. Is this still the best way? How do you go about doing it? 回答1: I am assuming you mean CSS Friendly Control Adapters? Which is the still the best way that I know of. In the HTML Snippets it doesn't render tables. Your other option would be to build the control by hand just using plan old HTML and possibly a Jquery Plugin to manipulate the tree. 来源:

My C++ executable runs way faster outside the Visual Studio 2008 IDE than inside, even in release

非 Y 不嫁゛ 提交于 2019-12-23 12:17:06
问题 I build a C++ application that does some number crunching. I'm running in Visual Studio 2008 PRO SP1, in release mode, Windows 7 64 bit. If I run it inside the IDE, the application takes 4 minutes, if I run the same executable from windows explorer it takes 6 seconds! I have no clue. I have checked that this does not depend on the processor and operating system. I don't think I have strange VS plugins that are doing something in the background. Any hints? Thank you in advance! Marco 回答1:

Defining a Template Member of a Template Class separately from the Declaration

流过昼夜 提交于 2019-12-23 12:00:53
问题 #include <cstdlib> template<class A> struct Foo { template<class B> static bool Bar(); }; template<class B> template<class A> bool Foo<A>::Bar<B>() { return true; } int main() { bool b = Foo<int>::Bar<long>(); b; } This results in a linker error: main.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl Foo<int>::Bar<long>(void)" (??$Bar@J@?$Foo@H@@SA_NXZ) referenced in function main I need to define this member function outside of the class template's declaration. In