Click here to Skip to main content
15,896,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to get the right URL before navigating the web page in the CHtmlView? Pin
superhandwolf16-Oct-05 7:11
superhandwolf16-Oct-05 7:11 
QuestionWindows Media Player Plugins (help plz) Pin
Member 236489616-Oct-05 6:54
Member 236489616-Oct-05 6:54 
QuestionHelp me on TAPI Pin
Cao Jianlin16-Oct-05 3:21
Cao Jianlin16-Oct-05 3:21 
AnswerRe: Help me on TAPI Pin
GflPower16-Oct-05 17:18
GflPower16-Oct-05 17:18 
QuestionInvalidateRect() Efficiency Pin
Cliff Hatch16-Oct-05 1:26
Cliff Hatch16-Oct-05 1:26 
AnswerRe: InvalidateRect() Efficiency Pin
John R. Shaw16-Oct-05 16:30
John R. Shaw16-Oct-05 16:30 
GeneralRe: InvalidateRect() Efficiency Pin
Cliff Hatch19-Oct-05 8:40
Cliff Hatch19-Oct-05 8:40 
QuestionError LNK2001: unresolved external symbol "__declspec(dllimport) public: class CString __thiscall Pin
mon2jan215-Oct-05 18:47
mon2jan215-Oct-05 18:47 
Hi, I am trying to use 3rd party API interface in VC++ module. Below is all that I got in the package.



CdCore.dll

CdCore.lib

CdCored.dll

CdCored.lib

CdDefs.h

CdSdk.h



This is my program



#include <cstdio>

#include <conio.h>

#include <sys\types.h>

#include <string>

#include <iostream>



#include <afxwin.h>

#include "cdsdk.h" // Standard CDSDK header file





using std::cout;





CWinApp theApp; // Keep MFC library happy (console app)



/* Submit a process file, wait for completion and then */

/* display the statistic records for the prccess */

int main(int argc, char *argv[], char *envp[])

{

// Make sure that MFC has a valid resource handle (console app)

AfxSetResourceHandle(::GetModuleHandle(NULL));



try

{

// Connect to the node and issue the 'SELECT PROCESS' command

CDNode node("MYNODE", "MYUSER", "MYPASSWORD");

CDProcIterator it = node.SelectProc();

while (it.HasMore())

{

CDProcess proc = it.GetNext();

cout << proc.GetNumber();

cout << ' ';

cout << proc.GetName();

cout << ' ';

cout << proc.GetQueue();

cout << '\n';

}

}

catch (const CDMsgException &e) // Catch all CBig Grin | :-D errors

{

for (int ii=0; ii < e.GetMsgCount(); ii++)

cout << e.GetMsg(ii) + "\n";

}



// Flush all output to the screen and wait ten seconds.

cout.flush();

Sleep(10000);



return 0;

}







My Error message











st4 - Win32 Debug--------------------
Compiling...
monTest4.cpp
c:\monica\workingfolder\sam\montest4\cddefs.h(771) : warning C4275: non dll-interface class 'CObject' used as base for dll-interface class 'CDData'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(666) : see declaration of 'CObject'
c:\monica\workingfolder\sam\montest4\cddefs.h(824) : warning C4275: non dll-interface class 'CObject' used as base for dll-interface class 'CDReference'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(666) : see declaration of 'CObject'
c:\monica\workingfolder\sam\montest4\cddefs.h(955) : warning C4275: non dll-interface class 'CObject' used as base for dll-interface class 'CDEvent'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(666) : see declaration of 'CObject'
c:\monica\workingfolder\sam\montest4\cddefs.h(992) : warning C4251: 'm_event' : class 'CEvent' needs to have dll-interface to be used by clients of class 'CDEvent'
c:\program files\microsoft visual studio\vc98\mfc\include\afxmt.h(121) : see declaration of 'CEvent'
c:\monica\workingfolder\sam\montest4\cddefs.h(993) : warning C4251: 'm_eventChangeWait' : class 'CEvent' needs to have dll-interface to be used by clients of class

'CDEvent'
c:\program files\microsoft visual studio\vc98\mfc\include\afxmt.h(121) : see declaration of 'CEvent'
c:\monica\workingfolder\sam\montest4\cdsdk.h(89) : warning C4275: non dll-interface class 'CWinThread' used as base for dll-interface class 'CDThread'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(3791) : see declaration of 'CWinThread'
c:\monica\workingfolder\sam\montest4\cdsdk.h(112) : warning C4251: 'm_eventExit' : class 'CEvent' needs to have dll-interface to be used by clients of class 'CDThread'
c:\program files\microsoft visual studio\vc98\mfc\include\afxmt.h(121) : see declaration of 'CEvent'
c:\monica\workingfolder\sam\montest4\cdsdk.h(262) : warning C4251: 'm_strKqv' : class 'CString' needs to have dll-interface to be used by clients of class 'CDStatData'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(330) : warning C4251: 'm_strDescription' : class 'CString' needs to have dll-interface to be used by clients of class

'CDMsgData'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(384) : warning C4251: 'm_strIP' : class 'CString' needs to have dll-interface to be used by clients of class 'CDInitParmsData'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(690) : warning C4251: 'm_strName' : class 'CString' needs to have dll-interface to be used by clients of class 'CDNodeData'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(697) : warning C4251: 'm_cs' : class 'CCriticalSection' needs to have dll-interface to be used by clients of class 'CDNodeData'
c:\program files\microsoft visual studio\vc98\mfc\include\afxmt.h(145) : see declaration of 'CCriticalSection'
c:\monica\workingfolder\sam\montest4\cdsdk.h(1050) : warning C4251: 'm_astrPathNames' : class 'CStringArray' needs to have dll-interface to be used by clients of class

'CDNetmapNodeData'
c:\program files\microsoft visual studio\vc98\mfc\include\afxcoll.h(499) : see declaration of 'CStringArray'
c:\monica\workingfolder\sam\montest4\cdsdk.h(1460) : warning C4275: non dll-interface class 'CObject' used as base for dll-interface class 'CDMsgException'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(666) : see declaration of 'CObject'
c:\monica\workingfolder\sam\montest4\cdsdk.h(1525) : warning C4251: 'm_aMsgs' : class 'CArray<struct cdmsgexception::msg,struct="" cdmsgexception::msg="" const="" &="">' needs to have

dll-interface to be used by clients of class 'CDMsgException'
c:\monica\workingfolder\sam\montest4\cdsdk.h(1931) : warning C4251: 'm_eventComplete' : class 'CEvent' needs to have dll-interface to be used by clients of class

'CDProcData'
c:\program files\microsoft visual studio\vc98\mfc\include\afxmt.h(121) : see declaration of 'CEvent'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2039) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2051) : warning C4251: 'm_btnOK' : class 'CButton' needs to have dll-interface to be used by clients of class 'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2704) : see declaration of 'CButton'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2051) : warning C4251: 'm_btnDetails' : class 'CButton' needs to have dll-interface to be used by clients of class

'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2704) : see declaration of 'CButton'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2052) : warning C4251: 'm_wndMsg' : class 'CStatic' needs to have dll-interface to be used by clients of class 'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2676) : see declaration of 'CStatic'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2052) : warning C4251: 'm_wndIcon' : class 'CStatic' needs to have dll-interface to be used by clients of class

'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2676) : see declaration of 'CStatic'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2053) : warning C4251: 'm_edit' : class 'CRichEditCtrl' needs to have dll-interface to be used by clients of class

'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxcmn.h(1012) : see declaration of 'CRichEditCtrl'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2058) : warning C4251: 'm_sizeDlgLarge' : class 'CSize' needs to have dll-interface to be used by clients of class

'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(137) : see declaration of 'CSize'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2059) : warning C4251: 'm_sizeDlgSmall' : class 'CSize' needs to have dll-interface to be used by clients of class

'CDExceptionDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(137) : see declaration of 'CSize'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2290) : warning C4275: non dll-interface class 'CObject' used as base for dll-interface class 'CDCommand'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(666) : see declaration of 'CObject'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2345) : warning C4251: 'm_strBaseCmd' : class 'CString' needs to have dll-interface to be used by clients of class 'CDCommand'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2346) : warning C4251: 'm_mpParmToValue' : class 'CMapStringToString' needs to have dll-interface to be used by clients of

class 'CDCommand'
c:\program files\microsoft visual studio\vc98\mfc\include\afxcoll.h(1386) : see declaration of 'CMapStringToString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2576) : warning C4251: 'm_strProcessText' : class 'CString' needs to have dll-interface to be used by clients of class

'CDSubmitCmd'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2577) : warning C4251: 'm_strFilename' : class 'CString' needs to have dll-interface to be used by clients of class

'CDSubmitCmd'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2578) : warning C4251: 'm_mpstrstrSymbolics' : class 'CMapStringToString' needs to have dll-interface to be used by clients of

class 'CDSubmitCmd'
c:\program files\microsoft visual studio\vc98\mfc\include\afxcoll.h(1386) : see declaration of 'CMapStringToString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2676) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'CDLogonDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2681) : warning C4251: 'm_strNode' : class 'CString' needs to have dll-interface to be used by clients of class 'CDLogonDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2682) : warning C4251: 'm_strPassword' : class 'CString' needs to have dll-interface to be used by clients of class

'CDLogonDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2683) : warning C4251: 'm_strUser' : class 'CString' needs to have dll-interface to be used by clients of class 'CDLogonDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2685) : warning C4251: 'm_strTitle' : class 'CString' needs to have dll-interface to be used by clients of class 'CDLogonDlg'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(2903) : warning C4251: 'm_strName' : class 'CString' needs to have dll-interface to be used by clients of class 'RegValue'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3006) : warning C4251: 'lcuFile' : class 'std::basic_fstream<char,struct std::char_traits<char=""> >' needs to have dll-interface

to be used by clients of class 'LCUNodeProperties'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3008) : warning C4251: 'm_strNode' : class 'CString' needs to have dll-interface to be used by clients of class

'LCUNodeProperties'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3009) : warning C4251: 'm_strAddress' : class 'CString' needs to have dll-interface to be used by clients of class

'LCUNodeProperties'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3010) : warning C4251: 'm_strPort' : class 'CString' needs to have dll-interface to be used by clients of class

'LCUNodeProperties'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3011) : warning C4251: 'm_strUserID' : class 'CString' needs to have dll-interface to be used by clients of class

'LCUNodeProperties'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
c:\monica\workingfolder\sam\montest4\cdsdk.h(3012) : warning C4251: 'm_strPassword' : class 'CString' needs to have dll-interface to be used by clients of class

'LCUNodeProperties'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
Linking...
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcpmtd.lib(delop.obj)
monTest4.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class CString __thiscall CDMsgException::GetMsg(int)const "

(__imp_?GetMsg@CDMsgException@@QBE?AVCString@@H@Z)
Debug/monTest4.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

monTest4.exe - 3 error(s), 42 warning(s)
QuestionRe: Error LNK2001: unresolved external symbol &quot;__declspec(dllimport) public: class CString __thiscall Pin
begray15-Oct-05 22:20
begray15-Oct-05 22:20 
AnswerPlease Help....Re: Error LNK2001: unresolved external symbol &quot;__declspec(dllimport) public: class CString __thiscall Pin
mon2jan216-Oct-05 8:16
mon2jan216-Oct-05 8:16 
QuestionEncode two integers! Pin
JoaoPe15-Oct-05 17:22
JoaoPe15-Oct-05 17:22 
AnswerRe: Encode two integers! Pin
Chris Losinger15-Oct-05 18:38
professionalChris Losinger15-Oct-05 18:38 
GeneralRe: Encode two integers! Pin
JoaoPe15-Oct-05 19:24
JoaoPe15-Oct-05 19:24 
AnswerRe: Encode two integers! Pin
Prakash Nadar15-Oct-05 19:04
Prakash Nadar15-Oct-05 19:04 
GeneralRe: Encode two integers! Pin
JoaoPe15-Oct-05 19:22
JoaoPe15-Oct-05 19:22 
GeneralRe: Encode two integers! Pin
begray15-Oct-05 22:24
begray15-Oct-05 22:24 
GeneralRe: Encode two integers! Pin
JoaoPe16-Oct-05 2:38
JoaoPe16-Oct-05 2:38 
GeneralRe: Encode two integers! Pin
Chris Losinger16-Oct-05 3:44
professionalChris Losinger16-Oct-05 3:44 
GeneralRe: Encode two integers! Pin
Bob Stanneveld16-Oct-05 10:46
Bob Stanneveld16-Oct-05 10:46 
GeneralRe: Encode two integers! Pin
ThatsAlok16-Oct-05 18:54
ThatsAlok16-Oct-05 18:54 
QuestionDIBitmap Pin
daojinliu15-Oct-05 15:46
daojinliu15-Oct-05 15:46 
AnswerRe: DIBitmap Pin
Chris Losinger15-Oct-05 16:56
professionalChris Losinger15-Oct-05 16:56 
GeneralRe: DIBitmap Pin
daojinliu15-Oct-05 18:24
daojinliu15-Oct-05 18:24 
GeneralRe: DIBitmap Pin
Chris Losinger15-Oct-05 18:45
professionalChris Losinger15-Oct-05 18:45 
GeneralRe: DIBitmap Pin
PJ Arends15-Oct-05 20:54
professionalPJ Arends15-Oct-05 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.