Re: CE6.0 App Building/Linking using Plat-Builder/SDK



great stuff...thanks.!

"Paul G. Tobey [eMVP]" wrote:

1. NO, YOU CAN'T USE YOUR EXISTING BUILD PROJECTS TO BUILD CE VERSIONS OF
YOUR EXISTING STUFF.

2. You need to build a project, a new one, that will build your existing
source, but targeting CE. You'd do this by creating a new project for each
piece (library, DLL, whatever), that you're currently building, in VS2005,
making sure to select Smart Device as the target, *NOT* plain Win32. For
example, if one of your subprojects of this huge EXE project builds a
library in a given folder, you'd do New | Project, then, in the new project
wizard, select Visual C++ | Smart Device as the project type, and Win32
Smart Device Project as the template. Select the correct folder where the
project will be placed and set the name to the name of the target library
that you're building.

Now, you get the next step in the wizard. On this one, you need to get to
the Platforms list and select your target SDK from the list, which should
have it, given that you've already installed your SDK. Once you've got your
SDK in the list, go to the Application Settings. Select the right project
type. In my little example here, you'd select Static Library. If possible,
after choosing the project type, select Empty Project. This will prevent
the wizard from generating a bunch of code that you don't want and can't
use. You want to get a project that will build the right type of target,
with the right name, but you want to later add your existing source to this
project. Finish the wizard.

Now, you have this empty project. Add your existing source to it, verify
that you can build the library (or whatever), correctly, targeting your SDK.
Once you've done that, move to the next piece of the overall build, the next
static library, the next DLL, or the EXE. Once you have separate projects
for all of the subcomponents, you can add them as dependent projects of the
main EXE project (with Insert Existing Project, I think it is).

3. Maybe it's temporary, maybe not. Since it's a lot of effort to build all
of the projects in 2 and make them work, if you're not going to make this
your final build scheme, don't do it. You're better off just going straight
to SOURCES/DIRS.

4. You should know how SOURCES/DIRS works already, if you've built an OS and
an SDK. The format is at least somewhat documented in the help, I think,
but the best documentation is the source for EVERYTHING BUILT BY PB. ;-)
This is how your OS was built. Everything from the common public stuff to
your BSP to your bootloader, etc.

Paul T.

"Deepak" <Deepak@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1D88AE7A-5C03-440A-BC57-C7ADDAA7B76A@xxxxxxxxxxxxxxxx
Thanks Paul, for a very good and patient response to a newcomer! Few
questions still remain. Your concern regarding me linking aginst PC built
libs is valid...I think I was trying to arrive at that answer as well as
building + linking my custom Solution to the OS image. So:

1. Now, that I have a SDK for my CE device, How do I make sure my PC built
solution to compile against this CE based SDK. (Yes, the SDK for CE has
been
created and installed.) I assumed if I dropped my Solution into the
sub-project item in Soln's explorer and start building an OS image, it
would
automatically start building my Solution with CE based libs. - No?

2. If answer is NO, then, please tell me, at first how to build my app
against CE based SDK. Yes, this SDK has been created and installed
successfully.

3. Yes, I understood the two ways to go about building. Your first
suggestion to configure build order seems to be a temporary soln., because
it
would involve editing .BIB files. I can pretty much imagine how this is
done.

4. Regarding creation of SOURCS/DIRS, could you elaborate more , or send
me
to a link. Not sure how to proceed with this setp.



"Paul G. Tobey [eMVP]" wrote:


"Deepak" <Deepak@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:86944706-4D1D-41C8-A134-F7E36AC08640@xxxxxxxxxxxxxxxx
Sorry, what I meant was, I would eventually need to add the project to
my
OS
image. That would mean, adding this particular VS2005 project to my
Solution
which includes (OS Design + All my Other Projects) - right?

You could add it, not as a subproject of the OS build, but as an ordinary
project, a sibling of the OS build. You'd have to set the build order to
build your program first, then the OS, and you'd have to set up so that
the
OS referenced the EXE generated by the first project in one of its BIB
files. Not so great for the overall smooth build experience, but maybe
easier than converting a large project to a SOURCES/DIRS one. If you
can't
live with this sibling projects, that's what I'd do: create SOURCES/DIRS
files to build the EXE as part of an ordinary build of stuff in Platform
Builder. Then all you have to do is add the top-level DIRS file to the
Subprojects part of your OS and let the build system go.

So, question really is, If I have a project that is built in VS2005
that
uses libs for PC ver of x86, how do I build this against an SDK that I
have
created for my CE 6.0 device (and build it to include the project in
the
final OS image).

This question makes me nervous. You can *never* use PC-targeted libs to
build a Windows CE EXE. Is that what you're asking? Someone built some
libs targeted at Windows XP or other desktop OS and your code needs to
link
with those binary libraries to generate your EXE? No, you can't do that.
You must compile all libraries that you're going to use *for Windows CE*,
no
exceptions. If you just mean that you need to link with coredll.lib
instead
of one of the desktop OS libraries, that's not a problem; just put that
in
your CE project.

Paul T.







.



Relevant Pages

  • Re: CE6.0 App Building/Linking using Plat-Builder/SDK
    ... making sure to select Smart Device as the target, ... given that you've already installed your SDK. ... static library, the next DLL, or the EXE. ... You must compile all libraries that you're going to use *for Windows CE*, ...
    (microsoft.public.windowsce.app.development)
  • Re: where is wininet.lib coming from?
    ... In eVC, you are *always* targeting a device SDK. ... C/C++ and Link tabs for the locations and, for libraries, names of extra ... Library files are not associated with header files. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Adding SDK
    ... When you target the SDK, ... Studio knows where to find its include files, libraries, etc. I'd say that ... Finally I've built the project ... eVC/Visual Studio. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: sdk question
    ... I can see the target CPU on remote file viewer so activesync is working. ... Windows CE is not like desktop Windows. ... SDK, but that's the exception, when you're talking about general Windows ... The real problem here is that the emulator that eVC knows about is ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: develop for ce.net 4.1 using VS2005
    ... >templates supplied with VS 2003 to target thheir platform. ... Examples include Pocket PC, Pocket PC 2002, ... Each SDK targets ... and is a LanPoint Mobile handheld terminal. ...
    (microsoft.public.pocketpc.developer)

Loading