Click here to Skip to main content
16,006,902 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow do I add text to a list control inside a property sheet? Pin
realius4-May-05 10:45
realius4-May-05 10:45 
AnswerRe: How do I add text to a list control inside a property sheet? Pin
David Crow5-May-05 3:20
David Crow5-May-05 3:20 
GeneralResizing comboboxes Pin
Jörgen Sigvardsson4-May-05 9:33
Jörgen Sigvardsson4-May-05 9:33 
GeneralRe: Resizing comboboxes Pin
toxcct5-May-05 1:06
toxcct5-May-05 1:06 
GeneralRe: Resizing comboboxes Pin
Jörgen Sigvardsson5-May-05 1:10
Jörgen Sigvardsson5-May-05 1:10 
GeneralInterop::Excel::Hell Pin
Delver4-May-05 9:24
Delver4-May-05 9:24 
QuestionHow to detect video card type? (PCI/AGP/PCI-E) Pin
umgoblue5254-May-05 8:56
umgoblue5254-May-05 8:56 
GeneralLinking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek4-May-05 8:45
Crocodilek4-May-05 8:45 
Hi,

For quite long time now I've been trying to get the Crypto++ (www.cryptopp.com) library working with a simple MFC Dialog Based application.

The strange thing is that a Win32 console application links and works fine with the same settings :-|

Here are the errors I'm getting:


--------------------Configuration: dialog - Win32 Debug--------------------
Linking...
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::_Winit::_Winit(void)" (??0_Winit@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::_Winit::~_Winit(void)" (??1_Winit@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(void)" (??1?$basic_s
tring@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(char const *,class st
d::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class std::basic_stri
ng<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: char const * __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@st
d@@QBEPBDXZ)" imported
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_collate_cp
Debug/dialog.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

dialog.exe - 29 error(s), 8 warning(s)



I've followed this tutorial:

http://www.codeproject.com/cpp/dirtypad.asp

with no luck Frown | :(

Here is some of the (I believe) relevant code:
- StdAfx.h
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#if !defined(AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_)
#define AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers

#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT


#pragma comment( linker, "/NODEFAULTLIB:msvcprtd.lib" )
#pragma comment( linker, "/NODEFAULTLIB:libcmtd.lib" )
#pragma comment( linker, "/NODEFAULTLIB:msvcprt.lib" )
#pragma comment( linker, "/NODEFAULTLIB:libcmt.lib" )



//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_)



- dialogDlg.cpp

// dialogDlg.cpp : implementation file
//

#include "stdafx.h"
#include "dialog.h"
#include "dialogDlg.h"

#include "pch.h"

#include "base64.h"
#include "md5.h"
#include "sha.h"
#include "ripemd.h"
#include "files.h"
#include "rng.h"
#include "hex.h"
#include "gzip.h"
#include "default.h"
#include "osrng.h"
#include "rsa.h"
#include "randpool.h"
#include "ida.h"
#include "socketft.h"

#include "validate.h"
#include "bench.h"

#include <iostream>

#if (_MSC_VER >= 1000)
#include <crtdbg.h> // for the debug heap
#endif

#if defined(__MWERKS__) && defined(macintosh)
#include <console.h>
#endif

USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)
...



Maybe there's something wrong with my configuration? Or with my VC++ instalation? Some library is still missing?

I was suggested that there could be something wrong with Calling / Naming convention but changing Calling convention didn't help Frown | :(

I've tried switching many options in Project -> Setting but neither helped.

I'm really in need of help Frown | :(

If needed I can gladly give more code snippets...

Best regards,
Maciej Zieba
GeneralRe: Linking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek5-May-05 19:18
Crocodilek5-May-05 19:18 
GeneralRe: Linking errors with MFC Dialog Based application and Crypto++ Pin
Crocodilek5-May-05 19:19
Crocodilek5-May-05 19:19 
Generalsdk Pin
_tasleem4-May-05 6:57
_tasleem4-May-05 6:57 
GeneralRe: sdk Pin
David Crow4-May-05 7:25
David Crow4-May-05 7:25 
GeneralRe: sdk Pin
_tasleem4-May-05 8:04
_tasleem4-May-05 8:04 
GeneralRe: sdk Pin
David Crow4-May-05 8:53
David Crow4-May-05 8:53 
Generalapi in vc Pin
4-May-05 6:27
suss4-May-05 6:27 
GeneralRe: api in vc Pin
Maximilien4-May-05 6:43
Maximilien4-May-05 6:43 
GeneralRe: api in vc Pin
4-May-05 7:07
suss4-May-05 7:07 
GeneralRe: api in vc Pin
Maximilien4-May-05 7:38
Maximilien4-May-05 7:38 
GeneralRe: api in vc Pin
David Crow4-May-05 7:29
David Crow4-May-05 7:29 
GeneralRe: api in vc Pin
_tasleem4-May-05 13:58
_tasleem4-May-05 13:58 
GeneralRe: api in vc Pin
Maximilien4-May-05 14:45
Maximilien4-May-05 14:45 
GeneralRe: api in vc Pin
David Crow5-May-05 1:56
David Crow5-May-05 1:56 
GeneralABOUT THE RTC Client API Pin
yeetins4-May-05 6:23
yeetins4-May-05 6:23 
QuestionThradIsSuspendd() ? Pin
peterchen4-May-05 6:00
peterchen4-May-05 6:00 
AnswerRe: ThradIsSuspendd() ? Pin
Graham Bradshaw4-May-05 12:50
Graham Bradshaw4-May-05 12:50 

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.