Hello Alll,

Sorry If I am posting the question in the wrong place. If so - pls advise!

Problem #1:
I am building a subproject in PB for CE 6.0
The subproject (by itself) works fine in VS2005 for PC version. Its only
when I move it to CE - and start building I get this error:

C:\WINCE600\OTHERS\ATL8\INCLUDE\altcecrt.h(9) : fatal error C1189: #error :
This header file is only used internally by ATL under the WinCE OS tree

Problem#2:
For some reason, I cannot seem to also create a New Project | Smart Dev in
my PB. The dialog gets stuck there, and does nothing. So, I have to create a
subprpject under OS design, and build against the SDK (that I create).
Also, I made sure, the SDK included the ATL (by manually adding ATL
directories, found under \OTHERS\ATL8) to SDK creation & building.
But even then, I get the above mentioned errors.

I have seen some posts on internet (which are too complex and seems to have
no clear resolution) and Mike Halls blog [adding XML/Web services for CE
stuff] that says use Win32 Smart Device ATL template - but as I said, project
creation for Smart Devices is failing in my setup. Also, I tried
re-installing VS [modify/repair option] not clean complete
uninstall/re-install, but to no help.

Problem #3
Do you think I am really building the subproject against the SDK I created?
Following are the steps I took:
1. Create SDK in PB. (Right Clk on SDK and follow steps to create a new SDK)
2. Now, Right Clicking on the Subproject name, and say build.
Is this sufficient for PB to understand that it needs to build against the
SDK?
Or do I need to install this SDK?

Thanks.

Re: ATL 8 Errors in Building CE 6.0 App by Paul

Paul
Wed Jul 30 13:38:35 PDT 2008

> Problem#2:
> For some reason, I cannot seem to also create a New Project | Smart Dev in
> my PB. The dialog gets stuck there, and does nothing. So, I have to create
> a
> subprpject under OS design, and build against the SDK (that I create).
> Also, I made sure, the SDK included the ATL (by manually adding ATL
> directories, found under \OTHERS\ATL8) to SDK creation & building.
> But even then, I get the above mentioned errors.
>
> I have seen some posts on internet (which are too complex and seems to
> have
> no clear resolution) and Mike Halls blog [adding XML/Web services for CE
> stuff] that says use Win32 Smart Device ATL template - but as I said,
> project
> creation for Smart Devices is failing in my setup. Also, I tried
> re-installing VS [modify/repair option] not clean complete
> uninstall/re-install, but to no help.


2. I haven't seen this. Try creating a Smart Device ordinary Windows
application, rather than something based on ATL. How does that work? If it
doesn't work, create a new workspace entirely, making sure that your WinCE
OS project isn't loaded into VS2005 as part of the same solution and repeat.

> Problem #3
> Do you think I am really building the subproject against the SDK I
> created?
> Following are the steps I took:
> 1. Create SDK in PB. (Right Clk on SDK and follow steps to create a new
> SDK)
> 2. Now, Right Clicking on the Subproject name, and say build.
> Is this sufficient for PB to understand that it needs to build against the
> SDK?

3. No, you are absolutely not building your subproject against the SDK.
You'd only be doing that when you create a new solution that contains a
smart device project and when you select your device SDK as the target of
that build.

When you build a PB subproject, you're building a subproject for your OS
design. You have complete access to any include folder and any library in
the Windows CE directory structure, which you have to carefully use to avoid
screwing yourself up in a spectacular way, at least as far as
maintainability. PB doesn't know anything about any SDK.

> Or do I need to install this SDK?

Now we get to the crux of it. You have built an SDK but not installed it?
It sounds like you have no SDKs installed. Why would you expect Visual
Studio to know what to do about generating a smart device application with
no smart device SDKs installed? I don't recall this as a specific failure
mode that I've seen, but you should certainly install any SDK you want to
use before 2.

Paul T.




Re: ATL 8 Errors in Building CE 6.0 App by Tom

Tom
Wed Jul 30 22:52:27 PDT 2008

>Problem #1:
>...
>>C:\WINCE600\OTHERS\ATL8\INCLUDE\altcecrt.h(9) : fatal error C1189: #error :
>This header file is only used internally by ATL under the WinCE OS tree
>
Personally I wouldn't recommend developing an ATL project as a PB
subproject unless it's a very small, simple one. Visual Studio
provides much better wizard tools for Native Smart Device ATL projects
than you get in PB subprojects.

However, if you want to continue this way (or if you simply can't
resolve your Smart Device wizard problem (see below) make sure you set
the variable...

WINCEATL80=1

...in your subproject's SOURCES file. This sets up the necessary
defines for using the ATL headers in your project.

>Problem#2:
>For some reason, I cannot seem to also create a New Project | Smart Dev in
>my PB. The dialog gets stuck there, and does nothing. So, I have to create a
>subprpject under OS design, and build against the SDK (that I create).
>Also, I made sure, the SDK included the ATL (by manually adding ATL
>directories, found under \OTHERS\ATL8) to SDK creation & building.
>But even then, I get the above mentioned errors.

This sounds like maybe the old VS Wizard vs. IE7 security problem.
Here's what to try - Close Visual Studio. Use Regedit and find the
registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Ext\PreApproved.
Add a new subkey to that key called
{D245F352-3F45-4516-B1E6-04608DA126CC}. Close Regedit and restart
Visual Studio and try creating the native Smart Device project again.

>Problem #3
>Do you think I am really building the subproject against the SDK I created?

No, you are not. Subprojects are built against the header files and
libraries in your OSDesign's CESYSGEN folder. SDKs are installed
under the "\Program Files\Windows CE Tools" and are used only when
selected as the target platform for a VS Smart Device project.

Tom

Re: ATL 8 Errors in Building CE 6.0 App by UserAnony

UserAnony
Sun Aug 03 09:35:00 PDT 2008

Thank you for your time.

I changed WINCEATL80=1 (before it was WINCEAL30=1), and also _TGTCPU to
mySDK (which is my successfully built & installed SDK). But still facing same
error as last time:
C:\WINCE600\OTHERS\ATL8\INCLUDE\altcecrt.h(9) : fatal error C1189: #error :
This header file is only used internally by ATL under the WinCE OS tree

On the other hand, my VS installation magically is now letting me create
smart devices project (ATL, MFC or others). So, I will try to build the
project using smart devices template. However, to proceed this way - I'd like
to know how I can create a project (new) from existing project using
SOURCES/DIRS method. The reason I insist on SOURCES/DIRs is because, my CE 5
project that I am moving to CE6 is faily complexin structure (1000+ dirs),
25+ Projects, etc, but ultimately one .EXE
Could someone please tell me how? Currently, when I build subprojects of OS
Design, it lets me build (sub)projs using SOURCES/DIR, but not when I try to
create a new proj ( File | New | Project | Smart Deice | ATL Smart
Device....etc or even the File | New | Project from Existing Code |.... )

Thanks.



Re: ATL 8 Errors in Building CE 6.0 App by UserAnony

UserAnony
Sun Aug 03 09:35:01 PDT 2008

Thank you for your time.

I changed WINCEATL80=1 (before it was WINCEAL30=1), and also _TGTCPU to
mySDK (which is my successfully built & installed SDK). But still facing same
error as last time:
C:\WINCE600\OTHERS\ATL8\INCLUDE\altcecrt.h(9) : fatal error C1189: #error :
This header file is only used internally by ATL under the WinCE OS tree

On the other hand, my VS installation magically is now letting me create
smart devices project (ATL, MFC or others). So, I will try to build the
project using smart devices template. However, to proceed this way - I'd like
to know how I can create a project (new) from existing project using
SOURCES/DIRS method. The reason I insist on SOURCES/DIRs is because, my CE 5
project that I am moving to CE6 is faily complexin structure (1000+ dirs),
25+ Projects, etc, but ultimately one .EXE
Could someone please tell me how? Currently, when I build subprojects of OS
Design, it lets me build (sub)projs using SOURCES/DIR, but not when I try to
create a new proj ( File | New | Project | Smart Deice | ATL Smart
Device....etc or even the File | New | Project from Existing Code |.... )

Thanks.



Re: ATL 8 Errors in Building CE 6.0 App by Tom

Tom
Tue Aug 05 10:31:07 PDT 2008

There should've been no need to change _TGTCPU. It's set by the build
environment based on your target platform.

You should not be getting that error if WINCEATL80 is set if you are
building under Platform Builder. MAKEFILE.DEF sets the CDEFINE for
_ATL_WINCEINTERNAL when WINCEATL80==1 which should prevent that
compilation error from being emitted.

Glad to hear your VS Smart Device wizard is running. So, if you want
to build your project using the existing DIRS and SOURCES, just leave
it as a PB subproject. Since you are porting an existing project
rather than designing new code, the benefits of moving to a VS project
are greatly reduced.

Tom

On Sun, 3 Aug 2008 09:35:00 -0700, User_Anony
<UserAnony@discussions.microsoft.com> wrote:

>Thank you for your time.
>
>I changed WINCEATL80=1 (before it was WINCEAL30=1), and also _TGTCPU to
>mySDK (which is my successfully built & installed SDK). But still facing same
>error as last time:
>C:\WINCE600\OTHERS\ATL8\INCLUDE\altcecrt.h(9) : fatal error C1189: #error :
>This header file is only used internally by ATL under the WinCE OS tree
>
>On the other hand, my VS installation magically is now letting me create
>smart devices project (ATL, MFC or others). So, I will try to build the
>project using smart devices template. However, to proceed this way - I'd like
>to know how I can create a project (new) from existing project using
>SOURCES/DIRS method. The reason I insist on SOURCES/DIRs is because, my CE 5
>project that I am moving to CE6 is faily complexin structure (1000+ dirs),
>25+ Projects, etc, but ultimately one .EXE
>Could someone please tell me how? Currently, when I build subprojects of OS
>Design, it lets me build (sub)projs using SOURCES/DIR, but not when I try to
>create a new proj ( File | New | Project | Smart Deice | ATL Smart
>Device....etc or even the File | New | Project from Existing Code |.... )
>
>Thanks.
>

Re: ATL 8 Errors in Building CE 6.0 App by UserAnony

UserAnony
Tue Aug 05 11:16:01 PDT 2008

I see. OK. Thanks for your time.
But it still does not improve my situation. Because, I still cannot build if
its of subproject type. And I am stuck creating new project and maintaining
the dir structure if I choose to do the Smart Device template solution.
So, my question is is there a way out of either of the problems for me:
Basically, to improve my current situation, I'd need one of the following to
work:

1. ATL building of Subproject Type
2. Creating a blank/empty ATL Smart Dev Proj type and importing my existing
CE 5.0 using Sources/Dir method

Also, what would be very helpful is if to know how exactly to add ATL
support to my custom SDK. The dir structure of my custom SDK is now as
follows:

C:\WINCE600\OSDesigns\OSDesign_Jul_08_v1\OSDesign_Jul_08_v1\SDKs\SDK2\obj\SDK2

and under this are dirs:
\ADDATL
INCLDUE
\LIB

and under \ADDATL are \INCLDUE (contains atl headers...)
\LIB (contains atl libs) and \SRC (contains some C/C++ files)

I'm wonderingif all the header under \ADDATL\INCLDUE should appear under
.....\SDK2\obj\SDK2\INCLUDE
And if this is the reason the subproject is not building against the correct
SDK. And I tried to do the above step, and it wont let me pull ATL headers to
the dir \ADDATL (a dir, created by myself to bring in all ATL files)

Thanks,
-Deepak


Re: ATL 8 Errors in Building CE 6.0 App by Tom

Tom
Tue Aug 05 12:29:52 PDT 2008

If you are building as a SOURCES/DIRS project in Platform Builder you
*do not need an SDK*. Rather follow these SOURCES guidelines:

- Set WINCEATL80=1
- If you're building as a subproject of a sysgen?ed OS project, add
$(ATL8LIBS) to the TARGETLIBS section in the project makefile, or add
$(ATL8LIBD) if you want to build against the DEBUG version of ATL.
- If you're building as a standalone non-sysgen?ed project add
$(S_ATL8LIBS) or $(S_ATL8LIBSD) for the DEBUG ATL.
- Remove any explicit ATL include path from the INCLUDES variable

Also, be sure there aren't any other leftover ATL-related variables
set in your SOURCES file. For more info on this see this link -
http://msdn.microsoft.com/en-us/library/aa934542.aspx

As for adding ATL support to your SDK, just make sure you have the
Active Template Library (ATL) component (SYSGEN_ATL) selected in your
OS project when you SYSGEN, and that you have "Native development
support" selected in your SDK configuration, and the ATL headers and
libraries will be included in your SDK when you build it.

Tom

On Tue, 5 Aug 2008 11:16:01 -0700, User_Anony
<UserAnony@discussions.microsoft.com> wrote:

>I see. OK. Thanks for your time.
>But it still does not improve my situation. Because, I still cannot build if
>its of subproject type. And I am stuck creating new project and maintaining
>the dir structure if I choose to do the Smart Device template solution.
>So, my question is is there a way out of either of the problems for me:
>Basically, to improve my current situation, I'd need one of the following to
>work:
>
>1. ATL building of Subproject Type
>2. Creating a blank/empty ATL Smart Dev Proj type and importing my existing
>CE 5.0 using Sources/Dir method
>
>Also, what would be very helpful is if to know how exactly to add ATL
>support to my custom SDK. The dir structure of my custom SDK is now as
>follows:
>
>C:\WINCE600\OSDesigns\OSDesign_Jul_08_v1\OSDesign_Jul_08_v1\SDKs\SDK2\obj\SDK2
>
>and under this are dirs:
>\ADDATL
>INCLDUE
>\LIB
>
>and under \ADDATL are \INCLDUE (contains atl headers...)
>\LIB (contains atl libs) and \SRC (contains some C/C++ files)
>
>I'm wonderingif all the header under \ADDATL\INCLDUE should appear under
>.....\SDK2\obj\SDK2\INCLUDE
>And if this is the reason the subproject is not building against the correct
>SDK. And I tried to do the above step, and it wont let me pull ATL headers to
>the dir \ADDATL (a dir, created by myself to bring in all ATL files)
>
>Thanks,
>-Deepak

Re: ATL 8 Errors in Building CE 6.0 App by Tom

Tom
Tue Aug 05 12:35:46 PDT 2