BUILD: [01:0000000040:ERRORE] oal_startup_x86.lib(oeminit.obj) : error
LNK2019: unresolved external symbol __wcsicmp referenced in function
_OEMCertifyInit
BUILD: [01:0000000041:ERRORE] C:\WINCE500\platform\CEPC\target
\x86\retail\kern.exe : fatal error LNK1120: 1 unresolved externals
Anyone know why I would be getting these? I define include the
"extern int _wcsicmp()" prototype at the beginning of the oeminit.c
file.
I also want to implement the SHA1 hashing of rsaenh.dll using
CryptCreateHash(), CryptAcquireContext(), etc. functions, but I get
more link errors. Assuming this is the same issue as _wcsicmp, anyone
have suggestions?
Did you check, that SYSGEN_STDIO is in your pbxml file?
Helge
On Dec 4, 10:02 am, "Helge Kruse" <Helge.Kruse-nos...@gmx.net> wrote:
> "cdew4545" <carson...@gmail.com> wrote in message
I should add some more info. I run dumpbin /EXPORTS /SYMBOLS
coredll.dll and _wcsicmp is present in the list. Is there any issue
with calling this function in oeminit.c file? I know this file is
loaded early on and has some restrictions to calling system APIs, but
it doesn't seem like there should be a problem here. Also, it *was*
directly from the example in the documenation, not to say that
documentation is always correct.
Paul T.
"cdew4545" wrote:
> On Dec 4, 11:18 am, cdew4545 <carson...@gmail.com> wrote:
> > When I perform a Sysgen, the variable SYSGEN_STDIO = 1 shows up in the
> > build output, but I checked my pbxml file and it wasnt in there. I
> > then added <Feature Name="Item" FeatureVariable="SYSGEN_STDIO"
> > Anchored="True" /> in the pbxml file and re-sysgened, but I still get
> > the same link errors.
> >
> > On Dec 4, 10:02 am, "Helge Kruse" <Helge.Kruse-nos...@gmx.net> wrote:
> >
> > > "cdew4545" <carson...@gmail.com> wrote in message
> >
> > >news:cc1efbdc-7760-44b3...@a32g2000yqm.googlegroups.com....
> >
> > > > Anyone know why I would be getting these? I define include the
> > > > "extern int _wcsicmp()" prototype at the beginning of the oeminit.c
> > > > file.
> >
> > > Did you check, that SYSGEN_STDIO is in your pbxml file?
> >
> > > Helge
>
> I should add some more info. I run dumpbin /EXPORTS /SYMBOLS
> coredll.dll and _wcsicmp is present in the list. Is there any issue
> with calling this function in oeminit.c file? I know this file is
> loaded early on and has some restrictions to calling system APIs, but
> it doesn't seem like there should be a problem here. Also, it *was*
> directly from the example in the documenation, not to say that
> documentation is always correct.
> .
>
That is what I suspected. I followed http://msdn.microsoft.com/en-us/library/aa448392.aspx
for better or worse. Follow up question, my real goal is to us
CryptCreateHash, etc functions with say they require "coredll.lib."
One, is there a coredll.lib, two is this the same issue. I'm sorry
for asking questions I could test, but I'm away from my computer with
the build system and hope to resolve this issue as quick as possible.
I am wrong. I am not trying to call _wcsicmp inside OEMInit(). I am
implementing OEMCertifyModuleInit/OEMCertifyModule functions. They
are called everytime a module is loaded that is not present in ROM.
Is the fact that I have these functions defined all in oeminit.c where
the issue is? Can the linker not properly link the functions because
they are inside oal_startup_x86.lib?
Paul T.
"cdew4545" <cars...@gmail.com> wrote in message
news:2820adea-9792-494c...@p19g2000vbq.googlegroups.com...
I'm a bit confused by your comments. Sticking to the _wcsicmp()
example, why would I have to use LoadLibrary() to call _wcsicmp()?
Isn't including the proper header files and extern defintion enough?
In particular, this is what I am referencing:
http://msdn.microsoft.com/en-us/library/aa448392.aspx
if you do a Ctrl+F for _wcsicmp you will find what I am trying to
accomplish. To me, calling a string comparison function (I've even
tried strcmp()) should be a simple task no matter what function I'm
in.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
Eurotech Inc.
www.Eurotech.com
"cdew4545" <cars...@gmail.com> wrote in message
news:ea525242-be4d-4714...@k9g2000vbl.googlegroups.com...
Since this is my first experience with Windows CE, I'm trying to
figure out where to link the file. I can't find any hint of a
makefile buried behind the IDE.
I was not suggesting that you use LoadLibrary for _wcsXXX. My reply should
have shown up as a reply to your post about CryptCreateHash(), etc, which you
could try accessing via LoadLibrary...
Paul T.
"cdew4545" wrote:
> On Dec 8, 3:24 pm, "Bruce Eitman [eMVP]"
> <bruce.eitman.nos...@Eurotech.com.nospam> wrote:
> > Well, no. Simply including a header file and extern definitions is not
> > enough. You must link with the library that implements the function.
> >
> > --
> > Bruce Eitman (eMVP)
> > Senior Engineer
> > Bruce.Eitman AT Eurotech DOT com
> > My BLOGhttp://geekswithblogs.net/bruceeitman
> >
> > Eurotech Inc.www.Eurotech.com
> >
> > "cdew4545" <carson...@gmail.com> wrote in message
> >
> > news:ea525242-be4d-4714...@k9g2000vbl.googlegroups.com...
> > On Dec 6, 6:09 pm, "Paul G. Tobey [eMVP]" <paul tobey _AT_ earthlink
> >
> >
> >
> > _DOT_ net> wrote:
> > > Those functions are certainly not in that library. The potential problem
> > > is
> > > linking with an import library. Just as a test, use LoadLibrary,
> > > GetProcAddress to try to load the crypto32.dll (I think that's the right
> > > target for your cryptography stuff). I'm frankly not sure what you can or
> > > can't do from inside the module certification functions...
> >
> > > Paul T.
> >
> > > "cdew4545" <carson...@gmail.com> wrote in message
> >
> > >news:2820adea-9792-494c...@p19g2000vbq.googlegroups.com....
> .
>
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
Eurotech Inc.
www.Eurotech.com
"cdew4545" <cars...@gmail.com> wrote in message
news:511cd5c9-7cfa-4c22...@f16g2000yqm.googlegroups.com...
I've done the following things:
1) I tried adding the following to the sources file for
oal_startup_x86.lib project :
SOURCELIBS= \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
outcome: Everything linked properly (no longer getting the cannot
find _wcsicmp external symbol error). I built the image, downloaded
it, but it hangs early on trying to connect to the debugger. If I
take out my use of _wcsicmp but still leave in the SOURCELIBS it boots
properly because I assume it actually links in nothing.
2) I searched coredll.def to find what library _wcsicmp() actually
resides in. It shows coreloc.lib. I then used this in the sources
file:
SOURCELIBS= \
$(_WINCEROOT)\public\common\oak\lib\x86\retail\coreloc.lib \
outcome: Again I come up with linking errors, but this time I get 38
errors. These errors all arise from a function name (presumably the
ones in the coreloc.lib) that is referenced in a completely different
function (not the OEMCertifyInit as it shows from the original _wcsicmp
() link problem).
MY QUESTION:
It appears that I've found the correct place to be medelling with all
your previous answers, but I'm still not closer to a solution. I can
write an alternate string comparison function to suit my needs, but I
cannot create my own cryptographic hash function. CryptCreatHash()
also resides in coredll.lib so I'm assuming I will run into the exact
same problems I'm having with _wcsicmp(). Any new advice?
Another piece of information I think is noteworthy...I include
externally defined functions that reside in loadauth.lib by simply
declaring them within oeminit.c. I do not do any special linking
myself. Why does it work for CertifyModuleInit but not for _wcsicmp?
I've figured out more of my problem. I'm not calling _wcsicmp() from
OEMInit(). I'm only setting up the function pointers pOEMLoadInit and
pOEMLoadModule. The functions that these point to will eventually
call _wcsicmp(), but by the time they are called, most of the OS is
loaded. I've confirmed via debugging that coredll.dll is a module
that is loaded. This means I should have no problem calling _wcsicmp
(), except I still cannot get it to link properly (I debugged without
_wcsicmp() being compiled into the code). From the MSDN documenation,
_wcsicmp() is in link library coredll.dll. This means all I should
need to do is use and extern declaration for _wcsicmp() and include
"coredll.dll" as a TARGETLIBS variable correct? I'm focused on
implicit linking because I get the same sorts of unresolved link
errors trying to explicit link when I call LoadLibrary/GetProcAddress.
Assuming that is correct for implicit linking, I still don't exactly
know what path to put for coredll.dll. I've done a windows search and
tried many of those paths as well as ones for coredll.lib but still
get LNK2019 unresolved symbol errors.
I've also even tried pulling all the code I added to the oeminit.c
file out into its own static library, but the end result is the
same...unresolved link error for _wcsicmp().
Any new direction you have would be wonderful as I'm banging my head
against the wall here.