Hi
I want to use the static MFC within a dll, but I get the following errors
when linking:
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol
__mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol
__mbctype
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol
__mbctype referenced in function "protected: long __thiscall
CEditView::OnFindReplaceCmd(unsigned int,long)"
(?OnFindReplaceCmd@CEditView@@IAEJIJ@Z)
When I specifiy _AFXDLL in the preprocessor settings the project compiles
correctly, but on program execution, the MFC71D.dll is still required, as
when using the shared dll mfc.
I tried to solve the problem by using /NODEFAULTLIB: nafxcwd.lib (as it was
described in an previous thread), but then I even get more errors.
Does somebody have an idea?
thanks
Alex 3 8094 http://support.microsoft.com/default...;EN-US;Q148652
--
---------------------------------------------------
Automate your software builds with Visual Build Pro http://www.visualbuild.com/
"ac2806" <ac****@onemail.at> wrote in message
news:43**********************@newsreader.inode.at. .. Hi I want to use the static MFC within a dll, but I get the following errors when linking: nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "protected: long __thiscall CEditView::OnFindReplaceCmd(unsigned int,long)" (?OnFindReplaceCmd@CEditView@@IAEJIJ@Z)
When I specifiy _AFXDLL in the preprocessor settings the project compiles correctly, but on program execution, the MFC71D.dll is still required, as when using the shared dll mfc.
I tried to solve the problem by using /NODEFAULTLIB: nafxcwd.lib (as it was described in an previous thread), but then I even get more errors.
Does somebody have an idea?
thanks Alex
Thanks for the link, but as I wrote before, when I try to ignore the lib
(nafxcwd.lib) by specifying it in "Properties/Linker/Input/Ignore Specific
Libraries", it get even more linker errors.
I also tried to add msvcrtd.lib but this also didn't help.
Any futher suggestions?
"Kyle Alons" <re***@to.newsgroup> wrote in message
news:u$**************@TK2MSFTNGP09.phx.gbl... http://support.microsoft.com/default...;EN-US;Q148652
-- --------------------------------------------------- Automate your software builds with Visual Build Pro http://www.visualbuild.com/
"ac2806" <ac****@onemail.at> wrote in message news:43**********************@newsreader.inode.at. .. Hi I want to use the static MFC within a dll, but I get the following errors when linking: nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(viewedit.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "protected: long __thiscall CEditView::OnFindReplaceCmd(unsigned int,long)" (?OnFindReplaceCmd@CEditView@@IAEJIJ@Z)
When I specifiy _AFXDLL in the preprocessor settings the project compiles correctly, but on program execution, the MFC71D.dll is still required, as when using the shared dll mfc.
I tried to solve the problem by using /NODEFAULTLIB: nafxcwd.lib (as it was described in an previous thread), but then I even get more errors.
Does somebody have an idea?
thanks Alex
Change In "Configration property "->"C/C++"->"Code Generation"->"RunTime
Library" to Multi-threaded (/MT)
Hope it will solve your problem This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mark A. Gibbs |
last post by:
I have a question about mixing C and C++.
In a C++ translation unit, I want to define a function with internal
linkage and C calling convention. Here's a sample of what I want to do:
//...
|
by: Scott |
last post by:
We are trying to build a managed C++ static link library containing several classes which are members of a namespace. The build of this library seems to work OK. No errors.
We then try to use...
|
by: pauldepstein |
last post by:
Sorry in advance if this message sounds imprecise but it's difficult to
be precise when you don't really understand what's going on.
I have a class called Parameters. The default constructor...
|
by: Charles Nicholson |
last post by:
Hello all-
I have some static C++ libraries that I wrote in VS2003 but which
upgraded fine when i went to VS2005 Pro. In them i overload the global
versions of operators new, new, delete, and...
|
by: DaTurk |
last post by:
Hi,
I've noticed that when trying to create a managed, auto_gcrooted
variable in a antive class, the compiler throws linker exceptions.
While searching some forums I found out that this is a...
|
by: Jeroen |
last post by:
Hi all,
I've got a question about writing a library. Let me characterize that
library by the following:
* there is a class A which is available to the user
* there is a class B that is used...
|
by: parag_paul |
last post by:
Can a class with out any instances present have it static members
updated.
If yes, on which object does the update happen.
-Parag
|
by: Jaco Naude |
last post by:
Hi,
I'm using a static library in my application which links fine except
for a few global variables. The static library only contains a bunch
of .cpp and .h files and the global variables are...
|
by: Juha Nieminen |
last post by:
As we know, the keyword "inline" is a bit misleading because its
meaning has changed in practice. In most modern compilers it has
completely lost its meaning of "a hint for the compiler to inline...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |