Hi,
I am porting an application for 64-bit AMD processor and while linking
the application i am getting the following errors:
Processing directory uidll...
Linking DLL G:\NewUIPackers 1\drivers\Unser \bin\WIN32\DEBU G\PPKAW1UI.dll
....
LINK : warning LNK4224: /PDBTYPE is no longer supported; ignored
UIDLL.def : error LNK2001: unresolved external symbol DllCanUnloadNow
UIDLL.def : error LNK2001: unresolved external symbol DllGetClassObje ct
UIDLL.def : error LNK2001: unresolved external symbol DllRegisterServ er
UIDLL.def : error LNK2001: unresolved external symbol
DllUnregisterSe rver
UIDLL.def : error LNK2001: unresolved external symbol getDevIC
G:\NewUIPackers 1\drivers\Unser \bin\WIN32\DEBU G\PPKAW1UI.lib : fatal
error LNK1120: 5 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
NMAKE : fatal error U1077: 'link' : return code '0x475'
Stop.
NMAKE : fatal error U1077: 'for' : return code '0x2'
Stop.
I have included the all the paths correctly.
Below is the declarations for the functions the error is in:
//STDAPI DllGetClassObje ct(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
extern "C" HRESULT __stdcall DllGetClassObje ct(REFCLSID rclsid, REFIID
riid, LPVOID* ppv)
{
AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
// see if somebody is trying to get one of our published classes
if (SUCCEEDED(_Mod ule.GetClassObj ect(rclsid, riid, ppv)))
return S_OK;
// this may be an MFC request
return AfxDllGetClassO bject(rclsid, riid, ppv);
}
//STDAPI DllCanUnloadNow (void)
extern "C" HRESULT __stdcall DllCanUnloadNow (void)
{
AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
// see if CComModule's instance can unload
if ( _Module.GetLock Count() == 0 )
return S_FALSE;
// see if MFC's COM can unload
if ( SUCCEEDED(AfxDl lCanUnloadNow() ) )
return S_FALSE;
return S_OK;
}
// by exporting DllRegisterServ er, you can use regsvr.exe
//STDAPI DllRegisterServ er(void)
extern "C" HRESULT __stdcall DllRegisterServ er(void)
{
AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
if (!COleObjectFac toryEx::UpdateR egistryAll(TRUE ))
return ResultFromScode (SELFREG_E_CLAS S);
return _Module.Registe rTypeLib();
}
I have tried the return types for the functions both STDAPI and extern
"C" HRESULT __stdcall but still the error is there. What further
changes i am should do to remove these linking errors. 3 14543
> I am porting an application for 64-bit AMD processor and while linking the application i am getting the following errors:
Processing directory uidll... Linking DLL G:\NewUIPackers 1\drivers\Unser \bin\WIN32\DEBU G\PPKAW1UI.dll ... LINK : warning LNK4224: /PDBTYPE is no longer supported; ignored UIDLL.def : error LNK2001: unresolved external symbol DllCanUnloadNow UIDLL.def : error LNK2001: unresolved external symbol DllGetClassObje ct UIDLL.def : error LNK2001: unresolved external symbol DllRegisterServ er UIDLL.def : error LNK2001: unresolved external symbol DllUnregisterSe rver UIDLL.def : error LNK2001: unresolved external symbol getDevIC G:\NewUIPackers 1\drivers\Unser \bin\WIN32\DEBU G\PPKAW1UI.lib : fatal error LNK1120: 5 unresolved externals LINK : fatal error LNK1141: failure during build of exports file NMAKE : fatal error U1077: 'link' : return code '0x475' Stop. NMAKE : fatal error U1077: 'for' : return code '0x2' Stop.
I have included the all the paths correctly. Below is the declarations for the functions the error is in: //STDAPI DllGetClassObje ct(REFCLSID rclsid, REFIID riid, LPVOID* ppv) extern "C" HRESULT __stdcall DllGetClassObje ct(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
// see if somebody is trying to get one of our published classes if (SUCCEEDED(_Mod ule.GetClassObj ect(rclsid, riid, ppv))) return S_OK;
// this may be an MFC request return AfxDllGetClassO bject(rclsid, riid, ppv); }
//STDAPI DllCanUnloadNow (void) extern "C" HRESULT __stdcall DllCanUnloadNow (void) { AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
// see if CComModule's instance can unload if ( _Module.GetLock Count() == 0 ) return S_FALSE;
// see if MFC's COM can unload if ( SUCCEEDED(AfxDl lCanUnloadNow() ) ) return S_FALSE;
return S_OK; }
// by exporting DllRegisterServ er, you can use regsvr.exe //STDAPI DllRegisterServ er(void) extern "C" HRESULT __stdcall DllRegisterServ er(void) { AFX_MANAGE_STAT E(AfxGetStaticM oduleState());
if (!COleObjectFac toryEx::UpdateR egistryAll(TRUE )) return ResultFromScode (SELFREG_E_CLAS S);
return _Module.Registe rTypeLib();
}
I have tried the return types for the functions both STDAPI and extern "C" HRESULT __stdcall but still the error is there. What further changes i am should do to remove these linking errors.
You need to change the LINKER settings. The linker cannot find the import
library for these functions. That is what it "unresolved external" means. I have tried the return types for the functions both STDAPI and extern "C" HRESULT __stdcall but still the error is there. What further changes i am should do to remove these linking errors.
Linking is off-topic in comp.lang.c++ . Just C++ is discussed here.
I would suggest reposting in a Microsoft VC newsgroups.
SH
Hi,
If you use uuid.lib in combination with other .lib files that define
GUIDs (for example, oledb.lib and adsiid.lib). For example:
oledb.lib(oledb _i.obj) : error LNK2005: _IID_ITransacti onObject
already defined in uuid.lib(go7.ob j)
To fix, add /FORCE:MULTIPLE to the linker command line options, and
make sure that uuid.lib is the first library referenced.
Saurabh Aggrawal This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Wolfgang |
last post by:
I have a problem with linking my CPP Code under a irix6 machine (sgi,
UNIX). In my CPP code I use some Functions which are written in
Python. So its a kind of CPP wrapper for my Python functions In my
Python Code I use threads to communicate over the network and stuff
like this. Compilation and linking are working very well under Windows
and Linux with the same code. Under the sgi, UNIX machine some errors
occur and I don't no why....
|
by: wmkew |
last post by:
Hello everyone
I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with LIBCMT(D).DLL. (My requirement is that we can't link with MSVCRT(D).LIB.) Below are steps I've followed, and the resulting problems
1. Using the New Project wizard, generate a Visual C++ .NET Class Library project (call it "Doomed") and a VC++...
|
by: Kay |
last post by:
I already specified to ignore specific library:
MSVCPRT.lib MSVCRT.lib LIBC.lib MSVCRTD.lib LIBCD.lib
command line is like:
/INCREMENTAL /NOLOGO /DLL /NODEFAULTLIB:"MSVCPRT.lib MSVCRT.lib LIBC.lib
MSVCRTD.lib LIBCD.lib"
but I am still getting conflict linking problems. But if I do specify
/NODEFAULTLIB, I'll get anther bunch of linking errors. Anybody knows why?
thanks,
|
by: Ralf Hoelzemer |
last post by:
hi list,
the sdk of a program i am writing a plugin for says:
" The dll project implementing the COM object must implement and export the
DllCanUnloadNow function in order to be freed by UnloadCOMLibs. See your
compiler documentation for more details about DllCanUnloadNow. "
is it possible to export "DllCanUnloadNow" from a vb.net class library and
if yes - how would i do this ?
|
by: Sanjay Kumar |
last post by:
Folks !
I am working with VC++ after a long time and having problem linking
latest xerces 2.7 in VC++ 2005 Express Edition.
I have done following:
1. downloaded and unpacked the the library:
http://www.apache.org/dist/xml/xerces-c/binaries/xerces-c_2_7_0-windows_2000-msvc_60.zip
| |
by: Philip Lowman |
last post by:
I am in the process of trying to migrate a couple of build solutions to
Visual Studio Express 2005 from VS 2003 Professional and I am running
into a weird C/C++ runtime library linking issue when using the /MT
compilation option. Our debug solution's /MTd flag works fine and
using /MD also seems to work ok. For some reason I can't fathom, when
I use /MT, linking the static excutable completely dies (problems
resolving symbols in the STL,...
|
by: Vishu7 |
last post by:
Hi,
I am porting my code which is written in VC2005( c++) to WinCE 5.0.
When i build my project i get this error
AACDec.def : error LNK2001: unresolved external symbol DllCanUnloadNow
AACDec.def : error LNK2001: unresolved external symbol DllGetClassObject
i have include all necessary library and include files. I didn't this
type of in VS2005 (c++), please anyone who have worked directshow in
wince , help.
|
by: xieml2007 |
last post by:
Dear Madam or Sir,
I encountered one problem which is quite similiar to the discussions launched at the web site:
http://www.thescripts.com/forum/thread280324.html
|
by: dotyet |
last post by:
Hi Everyone,
I am trying to build a DB2 UDB UDF which can perform regex over the
table data. The user defined function will call an external .dll file
to do the task. I am referring to the following link for doing so:
http://www.ibm.com/developerworks/db2/library/techarticle/0301stolze/0301stolze.html
While linking the below mentioned code, I am facing some errors. I
have installed PCRE and am using Visual C++ 6.0 in 32-bit mode. The
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |