EvoTalk

Posts Tagged ‘error

16 十二月, 2008

Uninstall Visual Studio 2008

Posted by: asd In: 科技新知| 軟體使用

若使用控制台的「新增或移除程式」無法移除 vs 2008,發生
「A problem has been encountered while loading the setup components. Canceling setup.」
錯誤訊息。到官方網站下載 AutoUninstallTool 就可以完全移除 vs2008了。
參考 : 解除安裝 Visual Studio 2008

Tags:

14 四月, 2008

VC6 Debug Error

Posted by: asd In: 科技新知| 軟體使用

vc6 debug 發生如下的錯誤訊息

One or more breakpoints cannot be set and have been disabled. Execution will stop at the beginning of the program.

解決的方法

project->setting->c/c++-general->debug info->program databse for edit and continue ;

Tags: ,

16 八月, 2007

gcc error: redefinition of typedef

Posted by: asd In: C++| Code Snippet| 程式設計

發生 redefniiton of typdef 的情形
view plain

C++:

// in a.h

typedef struct tagNBestS {

.....

}NBestS;

 

// in b.h

#ifndef NBestS

typedef struct tagNBestS NBestS;

#endif

編譯時發生
error: redefinition of typedef ‘NBestS
解決的方法
view plain

C++:

// in a.h

#ifndef __cplusplus

typedef struct NBestS NBestS;

#endif

struct NBestS {

....

};

 

//in b.h

struct NBestS;

Tags:

28 八月, 2006

EnumWindows Debug Error

Posted by: asd In: 科技新知| 軟體使用

VC6下用 Debug 模式執行EnumWindow 發生如下圖有關暫存器 ESP 的錯誤,Release 模式又ok
view plain

C++:

EnumWindows((WNDENUMPROC)EnumWindowsProc, 0);

 

BOOL EnumWindowsProc(HWND hWnd, long lParam)

{

char Buff[1000], NameOfClass[1000];

HWND hChild;

GetWindowText(hWnd, Buff, 1000);

GetClassName(hWnd, NameOfClass, 1000);

if (strcmp(NameOfClass, "Notepad") == 0) {

hChild = GetWindow(hWnd, GW_CHILD);

GetClassName(hChild, NameOfClass, 1000);

GetWindowText(hChild, Buff, 1000);

g_hWnd = hChild;

return FALSE;

}

return TRUE;

}

Solution
do NOT use the compile option "/Gz", this option changes the calling convention
/Gd __cdecl calling convention
/Gr __fastcall calling convention
/Gz [...]

Tags: ,

22 八月, 2006

VC error LNK2001

Posted by: asd In: 科技新知| 軟體使用

Build MFC UNICODE Program 時發生錯誤
msvcrtd.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
產生原因
The linker is looking for the entry point for a console application, but the application is being compiled and linked as a windows application (i.e. not a console application).
This error has been observed after changing the project settings from using MBCS to UNICODE characters.
解決方法
Under [...]

Tags: ,


  • BK: 大於和小於在今日更廣泛地使用於標籤上,故在此補充該英文用法: : angle bracket []: square bracket
  • luh1688: 非常實用且謝謝!~
  • asd: 好的,不過很久沒修改了,不知道能不能動 寄到您的yahoo信箱
  • LIANG: nice post, thank you
  • Justmaker: 您好,請問可以跟你要source嗎?我最近有在看股票,想要enhance您的小工具,不知是否可以開放?

Category