Linker error

Just starting out? Need help? Post your questions and find answers here.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Linker error

Post by jassing »

Any idea how I can resolve this? I'm compiling a DLL. Nothing too special about it; just a collection of various functions.
Linker wrote:'Linker error
error: Unresolved external symbol 'PB_DEBUGGER_SendTranslatedError' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_SendCommonError' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_SendCommonErrorFunction' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_Thread' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_SendTranslatedWarning' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_CheckProcedure' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_SendCommonWarning' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_RegisterObjectFunctions' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: error: Unresolved external symbol 'PB_DEBUGGER_RegisterLibrary' - referenced from 'Thread.lib(Debug.obj)'.
POLINK: fatal error: 9 unresolved external(s).
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Linker error

Post by infratec »

Comment out stuff in your dll sourcecode.

If you reduced it to a minimum with fault, show us the code.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Linker error

Post by jassing »

Calling this function generates the error. Outside of a DLL it works fine.

Code: Select all

    Procedure.s getDatetimeStr() ; higher resolution (milliseconds)
      Protected result.s
      Protected TINFO.SYSTEMTIME, *tinfo.SYSTEMTIME = @TINFO
      Protected *fmtd = Ascii(Space(100))
      GetSystemTime_(TINFO)
      
;>>>> SPECIFICALLY, this line: 
      !sprintf(p_fmtd, "%4d-%02d-%02dT%02d:%02d:%02d.%04dZ",
      !  p_tinfo->f_wyear,
      !  p_tinfo->f_wmonth, 
      !  p_tinfo->f_wday,
      !  p_tinfo->f_whour, 
      !  p_tinfo->f_wminute,
      !  p_tinfo->f_wsecond, 
      !  p_tinfo->f_wmilliseconds );
      
      result = PeekS(*fmtd,-1,#PB_Ascii) 
      FreeMemory(*fmtd) 
      ProcedureReturn result
    EndProcedure
    ;Debug getDatetimeStr()
    
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Linker error

Post by jassing »

Seems using C in a dll is problematic...
This line works fine in an exe, but in a DLL; it generates those cryptic linker errors.

Code: Select all

  ! sprintf(p_uptime,"%d:%02d:%02d:%02d.%03d",v_d,v_h,v_m,v_s,v_ms);
Post Reply