visual-c++

vc++ .h file compile error in g++

Hi, I have a .h,.dll and a .lib file given to me by a vendor all compiled in visual studio. I try to link the library in g++ and I get an error in the .h file that I dont understand. The error is: error: qualifiers can only be specified for objects and functions at several lines that have no qualifiers. It occurs randomly at if statem...

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

I'm using CUDA(VC++ visual studio 2008sp1) to debug a FEM program. The program can only run on a win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it,there is the error message"fatal error LNK1112: module machine type 'x64' conflicts with target machi...

C# code - Using a VC++ executable which refers another VC++ dll.

Hello, Am facing quite a nagging problem from quite sometime. The entire process is described below and please let me know what I am doing wrong: I have a VC++ project, say, "MyVC++Project" which references a third party dll named "thirdparty.dll". I am concerned about calling two methods from the dll, namely a.)::Validate(), which va...

memory leak detecting in C++ with/without Visual Leak Detector

Hi All I want to detect memory leaks of my C++ program in Windows. I read the documentation also on MSDN about mermoy leak detection and I also started using Visual Leak Detector. I have a doubt about the reporting of the leaks. I am expecting a file name with a line number, but I am always reported the text below. It has all the compo...

cannot open include file 'afxres.h' in VC2010 Express

hello, i try to compile an old project using VS express 2010 and i get the error: 1>terrain2.rc(10): fatal error RC1015: cannot open include file 'afxres.h'. from this code ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" i have insta...

Compiler error in VC++2010 (clean in 2008!), "ambiguous call to overloaded function"

I'm hitting a compile error in VS2010 with code that compiles cleanly in VS2008. Here's my error, from the Output Window, with all of its verbosity: ...\elementimpl.h(49): error C2668: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string' : ambiguous call to overloaded function with [ _Elem=char, _Traits=...

Visual studio 2008 not catching a syntax error

Visual studio 2008 isn't catching syntax errors. for example: Tpc_feed(void); compiles fine. this: Tpc_feed(void);;;;;;; compiles fine, but this Tpc_feed(void) catches an error. Are the extra semi-colons not syntax errors? I'm on Windows 7 32 bit and VS C++ 2008 ...

Can i use SAPI directly to convert Speech to Text from stored audio in real-time.

Hi, What i really want to achieve is this--> Suppose i play an audio file(using my application) which can either be streamed from the internet/or accessed directly from the local storage. Now i want to configure SAPI to listen to this source instead of the microphone and convert the speech from the audio to text like it does normally. ...

RegOpenKeyEx returns 1

I can't catch this problem on my own comp, but "test users" keep informing about this. What is it? (HKEY_CURRENT_USER, handle is got by RegOpenCurrentUser) 1 = ERROR_INVALID_FUNCTION ...

Fast changing QLineEdit crashing the application

I have three QLineEdit fields, whose content is changing really fast (100/second). Somehow it crashes the application. Maybe it's a bug or I make a mistake. Here is some code: acc[0]->setText(QString("%1").arg(acceleration.x)); acc[1]->setText(QString("%1").arg(acceleration.y)); acc[2]->setText(QString("%1").arg(acceleration.z)); The...

c++ free Profiler

i need a free profiler that works in win7 and compabitly with vs2010 thanks ...

c++ repaint part of window

i want to repaint part of the window not the whole thing. i have no idea how to. im using win32 please no mfc........ thanks in advance // create rect structure RECT rect2; rect2.left=0; rect2.top=0; rect2.right=225; rect2.bottom=300; // calling invalidateRect when left mouse button is donw case WM_LBUTTONDOWN: InvalidateRect(hWnd, ...

My BHO does not work properly. DocumentComplete does not trigger.

Hi. I am doing a BHO for Internet Explorer. The problem is only the SetSite is working. BUt the DocumentComplete does not been triggered. I need some help in pointing me what is I am doing wrong. Here is what I declared inside my header file: class ATL_NO_VTABLE CStockBar : public CComObjectRootEx<CComSingleThreadModel>, public CComCo...

How Can I call a C++ Win32 DLL from another C++ win32 Console Application

What is my main concern is , I am able to write a C++ dll using VC++ . Now the dll is present in the Debug folder. How can I use my DLL in other C++ Console Application. How to add reference or link the DLL to the application. Another point, While creating a DLL , The VC++ wizard gives me thre option: An Empty DLL project A Simple DL...

How to attach a separate imagelist to current IE toolbar?

How to properly assign an icon to a toolbar button, without affecting the current existing imagelist? In my case, my code has destroyed the current IE toolbar imagelists icons. When I register my own imagelist, all IE standard icons disappeared. How can I somehow attach a new imagelist to IE toolbar without disturbing other button's ico...

Error building legacy code with VS 2005

Trying to build a legacy code in VS2005 and get errors in VC header files. d:\Compilers\Microsoft Visual Studio 8\VC\include\xutility(2096) : error C2065: '_Sb' : undeclared identifier d:\Compilers\Microsoft Visual Studio 8\VC\include\xutility(2176) : see reference to class template instantiation 'std::istreambuf_iterator<_Elem,_Tra...

QT heap memory corruption

Hi, I'm writing a QT4.6 application(without the qt designer) and when I close the program I get this error from Visual Studio: Windows has triggered a breakpoint in Test.exe. This may be due to a corruption of the heap, which indicates a bug in Test.exe or any of the DLLs it has loaded. This may also be due to the u...

Syntax Error in MFC header file when compiling VC9 application

While migrating MFC application from VC6 to VC9 [VS2008] platform, there are some comilation errors showing error in MFC header files (ocdb.h, afxocc.h). c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\ocdb.h(551) : error C2143: syntax error : missing '}' before 'constant' c:\Program Files\Microsoft Visual Studio 9.0\VC\...

Message compiled into exe not found.

I'm using VC++ 6.0. I have an executable that contains a resource file and message.h file defined and I am trying to write to the event log. It is similar to the simpledown project that can be found on thecodeproject.com. The message ID is defined as 0x103. When I do the call to the ReportEvent, it writes to the event log with the buffer...

How to remove 'ImageList_Read' : inconsistent dll linkage warning ?

When I build my Visual C++ Solution ( 2005), I get the following warnings 1> c:\winddk\7000.0.winmain_win7beta.081212-1400\inc\api\commctrl.h(678) : see previous definition of 'ImageList_Read' 1>e:\xml parse\development\gui\h\wtl4mfc.h(6) : warning C4273: 'ImageList_Write' : inconsistent dll linkage 1> c:\winddk\7000.0.w...