Link to home
Start Free TrialLog in
Avatar of mdtaqi
mdtaqi

asked on

Linking errors in Embedded VC

Hi experts,
         need ur help.
         iam working on Embedded VC-4. Iam getting linking errors while building the code.
       Let me give u some more info abt it. the code that iam wrking on was running successfully when v bought it frm other company( they used  EVC -3). in here we are using some third party static libraries(.lib files) for carrying our some task.the linking errors that iam getting are referencing the functions that r actually in these lib files. They are giving it as "Unresolved external symbols".
      I have included the lib files in project settings->link->input , tools->options->directories, added it to the project thru file view, & even copied the lib files to the debug folders. still its not getting thru.
wht shd i do, pleas help me out.
awaiting ur response.
ThanQ.
Avatar of nonubik
nonubik

You have to add the libs to  project settings->link->input->object/library modules and the path to them at 'additional library path'.
Then, if you still get errors, please post them, maybe the fucntions are called with wrong parameter types.
Avatar of mdtaqi

ASKER

Hi, thanX for ur response.

i have already added the path to Additional library path. still iam getting the errors.As i said the code was running successfully when we bought it. i havent touched it. so i dont think theres a question of functions being called with wrong parameters.the lib files are same & also is the code. by the way.. are the lib files dependent on the os that they are built on?.Iam using XP , i dont know on which os was that code was written.

   one of the 3rd party libs is imgdecmp.lib provided by microsoft.i am getting the following errors when linking to it:

ScriptCtrlFactory.lib(imagedecmp.obj) : error LNK2019: unresolved external symbol __imp__FreeLibrary@4 referenced in function _GetHalftonePalette
ScriptCtrlFactory.lib(imagedecmp.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddressW@8 referenced in function _GetHalftonePalette
ScriptCtrlFactory.lib(imagedecmp.obj) : error LNK2019: unresolved external symbol _MessageBoxW@16 referenced in function _GetHalftonePalette
ScriptCtrlFactory.lib(imagedecmp.obj) : error LNK2019: unresolved external symbol _LoadLibraryW@4 referenced in function _GetHalftonePalette


iam getting similar errors when linking to the other lib files too.
Please tell me how to resolve these unresolved external symbols :).
awaiting ur response, ThanQ,
For errors 1,2,4 you need to link agains Coredll.lib.
For 3, Msgbox.lib.
Avatar of mdtaqi

ASKER


Hi, thanX for ur response & sorry for bothering u again.
 when i am including coredll.lib, along with the previous errors iam getting the following ones.

uafxwced.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll)
uafxwced.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll)
uafxwced.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored
uafxwced.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in coredll.lib(COREDLL.dll); second definition ignored


Iam also pasting here the other errors that iam getting when using the 3rd party dlls ,namely "radvh323.lib" & "g723lib.lib" .
----------------------------------------------------------------------------------------------------
H323Call.obj : error LNK2019: unresolved external symbol _cmCallDrop referenced in function "public: virtual __thiscall CH323call::~CH323call(void)" (??1CH323call@@UAE@XZ)
H323phone.obj : error LNK2001: unresolved external symbol _cmCallDrop
H323phone.lib(H323conf.obj) : error LNK2001: unresolved external symbol _cmCallDrop
H323Call.obj : error LNK2019: unresolved external symbol _cmCallMake referenced in function "public: int __thiscall CH323call::callMakeNewCall(struct HAPP__ const *,char *)" (?callMakeNewCall@CH323call@@QAEHPBUHAPP__@@PAD@Z)
H323Call.obj : error LNK2019: unresolved external symbol _cmCallSetParam referenced in function "public: int __thiscall CH323call::callMakeNewCall(struct HAPP__ const *,char *)" (?callMakeNewCall@CH323call@@QAEHPBUHAPP__@@PAD@Z)
H323phone.obj : error LNK2001: unresolved external symbol _cmCallSetParam
H323phone.lib(H323conf.obj) : error LNK2001: unresolved external symbol _cmCallSetParam
H323Call.obj : error LNK2019: unresolved external symbol _cmCallNew referenced in function "public: int __thiscall CH323call::callMakeNewCall(struct HAPP__ const *,char *)" (?callMakeNewCall@CH323call@@QAEHPBUHAPP__@@PAD@Z)
H323Call.obj : error LNK2019: unresolved external symbol _cmCallGetParam referenced in function "public: int __thiscall CH323call::callCallDisconnected(unsigned int)" (?callCallDisconnected@CH323call@@QAEHI@Z)
H323Call.obj : error LNK2019: unresolved external symbol _cmCallClose referenced in function "public: int __thiscall CH323call::callCallCheckGatewayRoute(struct HAPP__ const *,char *)" (?callCallCheckGatewayRoute@CH323call@@QAEHPBUHAPP__@@PAD@Z)
H323phone.lib(H323conf.obj) : error LNK2001: unresolved external symbol _cmCallClose
H323Call.obj : error LNK2019: unresolved external symbol _cmCallGetCallingPartyId referenced in function "public: int __thiscall CH323call::callPrepareInCall(struct HCALL__ const *,char *,char *)" (?callPrepareInCall@CH323call@@QAEHPBUHCALL__@@PAD1@
Z)
H323Call.obj : error LNK2019: unresolved external symbol _cmCallGetCalledPartyId referenced in function "public: int __thiscall CH323call::callPrepareInCall(struct HCALL__ const *,char *,char *)" (?callPrepareInCall@CH323call@@QAEHPBUHCALL__@@PAD1@Z
)
H323channel.obj : error LNK2019: unresolved external symbol _rtpSetEventHandler referenced in function "protected: int __thiscall CH323RtpSession::rtpsessionOpenSession(int)" (?rtpsessionOpenSession@CH323RtpSession@@IAEHH@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtcpOpen referenced in function "protected: int __thiscall CH323RtpSession::rtpsessionOpenSession(int)" (?rtpsessionOpenSession@CH323RtpSession@@IAEHH@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtpGetSSRC referenced in function "protected: int __thiscall CH323RtpSession::rtpsessionOpenSession(int)" (?rtpsessionOpenSession@CH323RtpSession@@IAEHH@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtpOpen referenced in function "protected: int __thiscall CH323RtpSession::rtpsessionOpenSession(int)" (?rtpsessionOpenSession@CH323RtpSession@@IAEHH@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtcpClose referenced in function "protected: void __thiscall CH323RtpSession::rtpsessionCloseSession(void)" (?rtpsessionCloseSession@CH323RtpSession@@IAEXXZ)
H323channel.obj : error LNK2019: unresolved external symbol _rtpClose referenced in function "protected: void __thiscall CH323RtpSession::rtpsessionCloseSession(void)" (?rtpsessionCloseSession@CH323RtpSession@@IAEXXZ)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelDrop referenced in function "public: virtual __thiscall CH323channel::~CH323channel(void)" (??1CH323channel@@UAE@XZ)
H323phone.lib(H323conf.obj) : error LNK2001: unresolved external symbol _cmChannelDrop
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelOpen referenced in function "protected: int __thiscall CH323channel::channelOpenOutboundChannel(struct HCALL__ const *)" (?channelOpenOutboundChannel@CH323channel@@IAEHPBUHCALL__@
@@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelSetRTCPAddress referenced in function "protected: int __thiscall CH323channel::channelOpenOutboundChannel(struct HCALL__ const *)" (?channelOpenOutboundChannel@CH323channel@@IAEHP
BUHCALL__@@@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelNew referenced in function "protected: int __thiscall CH323channel::channelOpenOutboundChannel(struct HCALL__ const *)" (?channelOpenOutboundChannel@CH323channel@@IAEHPBUHCALL__@@
@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtpSetRemoteAddress referenced in function "public: void __thiscall CH323channel::channelSetRtpRemoteAddress(unsigned int,unsigned short)" (?channelSetRtpRemoteAddress@CH323channel@@QAEXIG
@Z)
H323channel.obj : error LNK2019: unresolved external symbol _rtcpSetRemoteAddress referenced in function "public: void __thiscall CH323channel::channelSetRtcpRemoteAddress(unsigned int,unsigned short)" (?channelSetRtcpRemoteAddress@CH323channel@@QAE
XIG@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelClose referenced in function "public: void __thiscall CH323channel::channelStateChanged_Idle(struct HCHAN__ const *)" (?channelStateChanged_Idle@CH323channel@@QAEXPBUHCHAN__@@@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelAnswer referenced in function "public: void __thiscall CH323channel::channelStateChanged_Offering(struct HCHAN__ const *)" (?channelStateChanged_Offering@CH323channel@@QAEXPBUHCHA
N__@@@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelSetFlowControlToZero referenced in function "public: void __thiscall CH323channel::channelStateChanged_Offering(struct HCHAN__ const *)" (?channelStateChanged_Offering@CH323channe
l@@QAEXPBUHCHAN__@@@Z)
H323channel.obj : error LNK2019: unresolved external symbol _cmChannelSetAddress referenced in function "public: void __thiscall CH323channel::channelStateChanged_Offering(struct HCHAN__ const *)" (?channelStateChanged_Offering@CH323channel@@QAEXPBU
HCHAN__@@@Z)
H323phone.obj : error LNK2019: unresolved external symbol _rtpRead referenced in function "void __cdecl eventRtpPacketHandler(struct HRTPSESSION__ const *,void *)" (?eventRtpPacketHandler@@YAXPBUHRTPSESSION__@@PAX@Z)
H323phone.obj : error LNK2019: unresolved external symbol _cmEnd referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _rtpEnd referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _rtcpEnd referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _seliEnd referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _seliSelect referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _seliCallOn referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _rtcpInit referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _rtpInit referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _seliInit referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmSetChannelEventHandler referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmSetControlEventHandler referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmSetCallEventHandler referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmSetGenEventHandler referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmInitialize referenced in function "public: int __thiscall CH323phone::RunRadvisionStack(void)" (?RunRadvisionStack@CH323phone@@QAEHXZ)
H323phone.obj : error LNK2019: unresolved external symbol _cmCallSendUserInput referenced in function "private: int __thiscall CH323phone::SendUserInputMessage(struct HCALL__ const *,char *,int,unsigned char)" (?SendUserInputMessage@CH323phone@@AAEH
PBUHCALL__@@PADHE@Z)
H323phone.obj : error LNK2019: unresolved external symbol _cmUserInputBuildAlphanumeric referenced in function "private: int __thiscall CH323phone::SendUserInputMessage(struct HCALL__ const *,char *,int,unsigned char)" (?SendUserInputMessage@CH323ph
one@@AAEHPBUHCALL__@@PADHE@Z)
H323phone.obj : error LNK2019: unresolved external symbol _cmUserInputGet referenced in function "public: void __thiscall CH323phone::CallUserInputProc(class CH323call *,int)" (?CallUserInputProc@CH323phone@@QAEXPAVCH323call@@H@Z)
H323phone.obj : error LNK2019: unresolved external symbol _cmUserInputGetDetail referenced in function "public: void __thiscall CH323phone::CallUserInputProc(class CH323call *,int)" (?CallUserInputProc@CH323phone@@QAEXPAVCH323call@@H@Z)
H323phone.obj : error LNK2019: unresolved external symbol _cmCallAnswer referenced in function "public: void __thiscall CH323call::callAnswerThisCall(void)" (?callAnswerThisCall@CH323call@@QAEXXZ)
H323phone.lib(H323conf.obj) : error LNK2019: unresolved external symbol _cmCallMasterSlaveDetermineExt referenced in function "int __cdecl cmEvCallMasterSlave(struct HAPPCALL__ const *,struct HCALL__ const *,unsigned int,unsigned int)" (?cmEvCallMas
terSlave@@YAHPBUHAPPCALL__@@PBUHCALL__@@II@Z)
H323phone.lib(H323conf.obj) : error LNK2019: unresolved external symbol _cmChannelMediaLoopConfirm referenced in function "int __cdecl cmEvChannelMediaLoopStatus(struct HAPPCHAN__ const *,struct HCHAN__ const *,enum cmMediaLoopStatus)" (?cmEvChannel
MediaLoopStatus@@YAHPBUHAPPCHAN__@@PBUHCHAN__@@W4cmMediaLoopStatus@@@Z)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _Decoder_G723A_8u16s referenced in function "private: void __thiscall CWvDevMgr::PlayG723CodecSound(unsigned int,unsigned short,struct IppG723ADecodeStruct *)" (?PlayG723CodecSo
und@CWvDevMgr@@AAEXIGPAUIppG723ADecodeStruct@@@Z)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _rtpWrite referenced in function "private: void __thiscall CWvDevMgr::SendG723codecData(struct wavehdr_tag *,struct IppG723AEncodeStruct *)" (?SendG723codecData@CWvDevMgr@@AAEXP
AUwavehdr_tag@@PAUIppG723AEncodeStruct@@@Z)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _Encoder_G723A_16s8u referenced in function "private: void __thiscall CWvDevMgr::SendG723codecData(struct wavehdr_tag *,struct IppG723AEncodeStruct *)" (?SendG723codecData@CWvDe
vMgr@@AAEXPAUwavehdr_tag@@PAUIppG723AEncodeStruct@@@Z)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _rtpG7231Pack referenced in function "private: void __thiscall CWvDevMgr::SendG723codecData(struct wavehdr_tag *,struct IppG723AEncodeStruct *)" (?SendG723codecData@CWvDevMgr@@A
AEXPAUwavehdr_tag@@PAUIppG723AEncodeStruct@@@Z)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _DecoderInit_G723A_16s referenced in function "public: unsigned long __thiscall CWvDevMgr::fnWvDevMgrThread(void)" (?fnWvDevMgrThread@CWvDevMgr@@QAEKXZ)
H323phone.lib(WvDevMgr.obj) : error LNK2019: unresolved external symbol _EncoderInit_G723A_16s referenced in function "public: unsigned long __thiscall CWvDevMgr::fnWvDevMgrThread(void)" (?fnWvDevMgrThread@CWvDevMgr@@QAEKXZ)
emulatorDbg/UGotACall_CE.exe : fatal error LNK1120: 56 unresolved externals
Error executing link.exe.
---------------------------------------------------------------------------------------------------------------
The symbols(functions) that its saying as unresolved are there in the respective lib files.
pls tell me wht to do now.
awaiting ur response.
thanQ,

Avatar of mdtaqi

ASKER

Hello experts,
   this is urgent to me. pls help me out to know how to resolve these errors.at least tell me are the lib files operating system or environment dependent?. is it y iam getting these errors?.
  wht cud be the reason that the libraries are not identified by the linker even after adding 'em properly to the project.
hope to get  response.
thanQ.
Do the 3rd party libs link with MFC static or dynamic?
You need to link your project the same with MFC.
Avatar of mdtaqi

ASKER

Hi, thanX for replying ,
  I have no idea of these 3rd party libs.  they are there & i have to use it. i dont even have any docuentation abt 'em. so i dont know if they use MFC shared or not. is there any way to know it ?. but initially when my projects had the settings of "no MFC" , it gave errors ,so i set my projects to "using Mfc shared" , now they dont give any such mfc errors.
     one more thing i want to know is, are libs dependent upon OS or any other environment they are built on ?????????? i have been asking it nearly every time. Pls tell me if u know.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of nonubik
nonubik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mdtaqi

ASKER

Hi nonubik ,
 ThanX a lot for ur help.
  the errors that i was getting was due to : the libs were bulit on ARMV4 & i was running it on X86  cause my system doesnt support ARMV4.
  Now all those list of errors are gone, but few more are left.
  would you mind helping me further !! .
 
 Iam using  imgdecmp.lib & aygshell.lib in 2 more projects. this didnt cause problem prev when it was set to X86 , but now its also giving unresolved external errors as below.

ImgLoader.obj : error LNK2019: unresolved external symbol DecompressImageIndirect referenced in function "public: unsigned int __cdecl CImgLoader::LoadBitmapFromImgFile(unsigned short const *,int,struct HDC__ *)" (?LoadBitmapFromImgFile@CImgLoader@@
QAAIPBGHPAUHDC__@@@Z)

UGAC_MainFrame.obj : error LNK2019: unresolved external symbol SHCreateMenuBar referenced in function "public: int __cdecl CUGAC_MainFrame::CreateCommandBars(struct HINSTANCE__ *,struct HWND__ *)" (?CreateCommandBars@CUGAC_MainFrame@@QAAHPAUHINSTANC
E__@@PAUHWND__@@@Z)

 does this mean that these 2 libs are dependent on X86.

 by the way.. is it acceptable here to post few more queries even after accepting the answer ??
 
ThanQ once again.
>by the way.. is it acceptable here to post few more queries even after accepting the answer ??

Not exactly. It usually needs to be another question.
But if you feel that, you can request question re-opening and point increase to the moderators (https://www.experts-exchange.com/Community_Support/)

This time I'll answer here ;)

For second error you need to link against aygshell.lib.
As for the first one, I think DecompressImageIndirect is in one of your 3rd party libs.
Avatar of mdtaqi

ASKER

Hi,
 solved these errors my self.
 i was actually linking to the wrong aygshell & imgdecmp libs.
 to post another qstion , my accnt points have already exhausted , y dont u try solving my other question posted abt USB ,thats for 500 pts  :) .

thanx any way.
bye.
 
Avatar of mdtaqi

ASKER

Hi nonubik,
  sorry to bother u again.
  i know its not acceptable to post another question here.so i have posted one more question with the title "Linking errors in 3rd party libraries in Embedded VC" . its worth just 50pts. Hope it doesnt stop u from extending ur help to me ;).
  the 3rd party libs are built on ARM machine.so they are doing fine in ARM mode. but i want to see the output on emulator & hence debug it. but for this i have to run it on X86 which is giving out the same linking errors again. is there any way to change the libs to be compatible with X86??
 wht shd i do?? pls respond to me.

ThanX in advance.