Using WinCE 4.2 eVC++ 4
is it possible to link a program to a static library like Win32 ?
Exist some document or sample about that ?
TIA

/Helix

Re: Is it possible to link to a static LIB ? by Helix

Helix
Fri Apr 30 17:33:00 CDT 2004

> Using WinCE 4.2 eVC++ 4
> is it possible to link a program to a static library like Win32 ?
> Exist some document or sample about that ?

If I create a Static library
I have the following build error:

Creating library...
LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
Error executing link.exe.



Re: Is it possible to link to a static LIB ? by Steve

Steve
Sat May 01 10:03:40 CDT 2004

Where did the static library come from? Was it built with eVC for Windows
CE?

--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com



Re: Is it possible to link to a static LIB ? by Helix

Helix
Sat May 01 11:37:11 CDT 2004

> Where did the static library come from? Was it built with eVC for Windows
> CE?

Yes (of course)
I created the .def file but I get an error "cannot open file LIBC.lib"
But I've noticed just now that I have this error only in debug mode
with both Emulator and x86

Is it not possible to build static libraries in Debug mode ?
TIA




Re: Is it possible to link to a static LIB ? by Helix

Helix
Sat May 01 12:31:10 CDT 2004

I am trying to use static library because I wanted to trace a Stream Driver
Sample into the emulator.
I tried using Static library in release mode, and calling the LIB functions
I can see the debug out on the console.
However now I have a terrible doubt: Can I create a stream driver in a
Static Library ????
Reading the documents I am thinking it's not possible because how can the
O.S. call the driver entries if they are statically linked to the
application and not shown to the O.S. ?
What is your comment ?
TIA

/helix



Re: Is it possible to link to a static LIB ? by Steve

Steve
Sat May 01 14:47:13 CDT 2004

My comment - Huh?

At this point I have no idea what you are trying to do. What does a static
library have to do with a driver?

It sounds like you have a Driver DLL that uses a def file and generates an
IMPORT library for the DLL. You can have an application link to that if you
want but it is not likely to be of much use since it would load the driver
into the applications address space and the driver, if written correctly,
will need APIs only available or meaningful in the context of the device
manager process. Using the emulator and the kernel debugger in Platform
Builder's IDE you can step from an application call into your actual driver
and back out again. (You can't do that with the eVC debugger)

--
Steve Maillet (eMVP)
EmbeddedFusion
smaillet_AT_EmbeddedFusion_DOT_com



Re: Is it possible to link to a static LIB ? by russellk

russellk
Thu May 06 17:53:50 CDT 2004

The x86 compiler, since it's the same as the desktop, will add a linker
directive to link with LIBC. For CE, which doesn't have a LIBC, you need
to override that directive with the /NODEFAULTLIB linker switch.

--
Russ Keldorph
russellk@online.microsoft.com (Remove the 'online.' from my address to
reach me.)

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
--------------------
> Reply-To: "Helix" <helix-remove@despammed.com>
> From: "Helix" <helix-remove@despammed.com>
> References: <OX2TxKwLEHA.2592@tk2msftngp13.phx.gbl>
<ubs6lMwLEHA.3664@TK2MSFTNGP10.phx.gbl>
<#FZ4A24LEHA.3696@TK2MSFTNGP09.phx.gbl>
> Subject: Re: Is it possible to link to a static LIB ?
> Date: Sat, 1 May 2004 18:37:11 +0200
> Lines: 13
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
> Message-ID: <eAAw3p5LEHA.3596@tk2msftngp13.phx.gbl>
> Newsgroups: microsoft.public.windowsce.platbuilder
> NNTP-Posting-Host: 217.220.101.122
> Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA06.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08
.phx.gbl!tk2msftngp13.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.windowsce.platbuilder:49410
> X-Tomcat-NG: microsoft.public.windowsce.platbuilder
>
> > Where did the static library come from? Was it built with eVC for
Windows
> > CE?
>
> Yes (of course)
> I created the .def file but I get an error "cannot open file LIBC.lib"
> But I've noticed just now that I have this error only in debug mode
> with both Emulator and x86
>
> Is it not possible to build static libraries in Debug mode ?
> TIA
>
>
>
>