All Forums
 Microsoft Windows CE
 eVC Application Development
 Linking Errors
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

mmp

31 Posts

Posted - 24 Feb 2003 :  15:06:19  Show Profile  Email Poster
Hello All,

I've been having some problems when attempting to build an executable for my MFC application in "x86 release mode." The problem is that when I attempt to link the "mfcce211.dll" (assuming that this is really the file that I need to link), it tells me "invalid or corrupt file." (Note: I selected the "Use MFC in a shared DLL.") In case you are thinking that maybe the problem is that it doesn't find the file, that's not it -- it finds it, since if I write something like "mfffc" it reports that it cannot find the file. Of course, if I leave the "Object/library modules" editbox blank, I get the unresolved externals. The unresolved externals refer to the functions: "CreatePen" and "RedrawWindow". They are prefixed by "wce_"

Sample:

EditBox.obj : error LNK2001: unresolved external symbol "struct HPEN__ * __stdcall wce_CreatePen(int,int,unsigned long)" (?wce_CreatePen@@YGPAUHPEN__@@HHK@Z)

I tried using the "Use MFC in a static library" and changed the "Object/library modules" editbox to "mfcce211.lib" and I get an error in a standard header file (Afxdisp.h) saying:

C:\Windows CE Tools\wce211\MS HPC PRO\mfc\include\Afxdisp.h(63) : fatal error C1189: #error : "Can't build MFC OLE projects using static MFC libraries."

Note: My program makes use of the COleVariant object.

Just to see what happens, I tried using the "Use MFC in a shared .dll" together with the "mfcce211.lib" file and I just get the unresolved externals again. Lastly, I attempted to declare/prototype
the functions using the "extern" keyword but to no success.

Just to make sure it isn't something that I am doing wrong, I started a new project and attempted to use the "CanLib.lib" file provided by ADS (to use the CAN drivers.) If I use the "ARM - release mode" w/o linking the .lib file, of course, I get the unresolved externals; if I link it (project->settings->link) it works perfectly. However, if I do the exact same procedure w/ the "x86 - release mode", I get the unresolved externals (even though I link the .lib file.)

As a conclusion, what I am really trying to do is come up with an executable (x86) that if I execute, it should bring up the emulator and start execution (just like the \Windows CE Tools\wce211\MS HPC Pro\emulation\hpcpro\windows\calc.exe file.) I don't want to use
the debug version since it requires a lot of overhead and quite a few files.

p.s., I am using eVC 3.0, and H/PC Pro 2.11 for emulating on the PC.

Thanks in advance,
Marius

akidder

1519 Posts

Posted - 24 Feb 2003 :  18:14:20  Show Profile  Email Poster
Hi Marius. Is there a particular reason you're using MFC 2.11? Our systems currently run CE 3.0, which uses MFC300.dll. Just curious.
Go to Top of Page

mmp

31 Posts

Posted - 25 Feb 2003 :  08:25:44  Show Profile  Email Poster
Hi Drew,

The only reason why I use mfc 2.11 for the H/PC Pro 2.11 simulation, is because I noticed that the H/PC Pro software is associated with WCE 2.11 and MFC CE 2.11. (H/PC Pro is located in \wce211\) and the only available libraries are for mfc 2.11) Anyway, this is ONLY for simulating the program using H/PC Pro. On the actual ADS evaluation system, I am using mfcce300.dll which is associated w/ the HPC2000 software.

BTW, I tried using mfcce300.dll with the H/PC Pro simulation software before, but I only get the exact same message: "Invalid or corrupt file." Anyway, I am not exactly sure if I even have to explicitly link the .dll file, since I think it is a default library (and the ignore default library check box is UNCHECKED) because it works fine with the ARM - release mode (everything links perfectly.) I also tried using a "function level linking" (project->settings->c/c++ category 'customize') but it had no effect.

I've been putting off this problem for a while since everything worked well on the evaluation system so I didn't really need a release version for x86. However, now someone else would like to see the application but he doesn't have an ADS evaluation system or eVC++. He only has the H/PC Pro simulation software. That is why I need a release version for x86.

Marius


Go to Top of Page

mmp

31 Posts

Posted - 25 Feb 2003 :  14:14:27  Show Profile  Email Poster
... I am wondering if anyone else could replicate this problem. That is, if you create an MFC application (evc++ 3.0), use the function RedrawWindow() and then try building the .exe file for the H/PC Pro 2.11 emulator in x86 RELEASE mode. Does it get reported as being unresolved? and if yes, including "mfcce211.lib" in the object/library editbox (located at project->settings->link), does it solve the problem? thanks.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000