Linker error building DLL with old time(),ctime(), difftime() functions - ideas?

From: Joe Glassy (jglassy_at_lupinelogic.com)
Date: 12/30/04


Date: Thu, 30 Dec 2004 13:51:22 -0700

Hello PocketPC developer folks..

   I am working in EVC v4.2 with the PocketPC 2003 SDK (Armv4Dbg) target. I
am converting a static C and C++ library to a DLL. I've referenced all the
usual
headers required like "time.h", "stdlib.h", etc.

   I need to use several "old" (libc.lib style) functions: time(), ctime(),
asctime() and difftime(). When I build the library as a static library,
these
link in just fine. When I attempt to build the library as a DLL (with or
without MFC support), the reference to "difftime()" links in just fine, but
I get a
"unresolved externals" on "time()", "ctime()", and "asctime()". A quick
check using "dumpbin" on coredll.lib shows that "difftime()" symbol is
present, but no
"time()", or "ctime()" (perhaps these are inlined elsewhere?). Which
build-time switches, or additional binary static or DLL should I use to
resolve these "unresolved externals"? Why would the PPC 2003 SDK static
library build with no problems...while the DLL form with same sources, does
not? I'm sure I'm missing something very simple.

  The project parameters I've used are: "New|WinCE DLL" ...also tried
defining the DLL as one with MFC...

  Here is the EVC v4.2 emitted error report:
----------------------------------------------------------------------------
-----------------
   Creating library ARMV4Dbg/ce4.lib and object ARMV4Dbg/ce4.exp
lCoreSupport.obj : error LNK2019: unresolved external symbol time referenced
in function lCoreSeedPNRG
lSession.obj : error LNK2019: unresolved external symbol time referenced in
function lSessionTimerElapsed
lSession.obj : error LNK2019: unresolved external symbol ctime referenced in
function lSessionClose
ARMV4Dbg/ce4.dll : fatal error LNK1120: 2 unresolved externals
----------------------------------------------------------------------------
-----------------
Any help would be very appreciated!!

cheers,
Joe Glassy



Relevant Pages

  • Re: Linker error building DLL with old time(),ctime(), difftime() functions - ideas?
    ... > am converting a static C and C++ library to a DLL. ... > without MFC support), the reference to "difftime" links in just fine, ... > lSession.obj: error LNK2019: unresolved external symbol time referenced ... > function lSessionClose ...
    (microsoft.public.pocketpc.developer)
  • VB FAQs (Interview Questions) lot lot
    ... Consider two objects, A and B. A holds a reference to B, ... Why do so many example programs not use the DLL name ... Private Declare Function SendMessage Lib "user32" ... Private Const BUFFER_LENGTH As Long = 255 ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Sharing Code
    ... What I found would happen is that when the device dll was built visual ... In the desktop project when you add a reference to the dll, ... > projects, one smart device and one desktop, but they're in the same ... > The 2 form projects have references to this class library projects. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Namespaces - broad question
    ... Reference the Class Library in your Page, ... > aspx pages that I know I want utilize a specific function within, ... > have the same codebehind page), how can I reference this function. ... >> A .Net assembly is a compiled DLL. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Namespace Question
    ... >>i saw that when i changed it to true my dll was copied to the bin folder ... >>the reference by looking in the following locations, ... Look for assemblies in directories specified with the Reference Path ... >> tried to use the GAC but the process to convert dll to be strong name ...
    (microsoft.public.dotnet.languages.vb)