Problem to add ATL support tp a MFC project 
Author Message
 Problem to add ATL support tp a MFC project


I hope someone can help me with this problem.

I try to discripe my problem.

Our main project has the name "office system" ( with a space ). Now I
have tried to add ATL Support to our project ( Insert->New ATL Object
and answer Yes ).

After I have added ATL Support I can not longer compile the project.

The problem is that the midl compiler does not create the files "Office
System_i.h" and "Office System_i.c".

I have tested it with some other test projects. I created a new project
called "test test" and I get the same error. Then I have created a
project called "test_test" and it worked.

Its seems, that's it has something to do with the space in the project

Do someone know what I must change in our project to get the midl
compiler working? I don't want to create a new project and copy the old
files, because its a very huge project and it is too much work to change
the whole project.

You can easily reproduce the error.

-> create a project ( MFC exe, document container ) with a space in the
project name

-> Add atl support

-> build the project

Thanks for your help


Fri, 20 Feb 2004 22:01:16 GMT  
 Problem to add ATL support tp a MFC project
Hi Olaf,

Here is the workaround:

1.      Remove the .idl file from the project.
2.      Replace spaces in filename with underscore.
3.      Add file back to project.
4.      In file view right click on the .idl file and select 'settings'.
5.      Assume "My Project" is project name. In the MIDL tab 'Output filename'
should be "Debug/My Project.tlb" without quotes & with the space.
6.      In the MIDL tab 'Output header filename' should be "My Project.h"
without quotes & with the space (Make sure the name is not in conflict with
the App class header file)
7.      In the MIDL tab 'UUID file' should be "My Project_i.c" without quotes &
with the space
8.      In the MIDL tag make sure stubless proxies check box is checked.9.      In
file view right click on the .idl file and select 'compile'. The following
files are generated

My Project.h
My Project_i.c
debug/My Project.tlb
My_Project_p.c (since we cannot set "/proxy" flag for midl from inside of
msdev, the file has an underscore instead of space)

Also refer to the following KB article:
Q175190 HOWTO: Add ATL Support to an MFC EXE

Hope it helps.

Best Regards,


Mon, 23 Feb 2004 10:10:45 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Adding ATL support to MFC project - problem

2. HELP:How to add MFC support to ATL service project

3. Adding MFC support to an ATL project

4. Can't add ATL support to existing MFC project

5. Error Adding ATL support to MFC project

6. Adding MFC Support to an ATL Service Project

7. Need to add MFC support to ATL project

8. ATL COM Project with MFC Support causes problem with Processor Pack for VC.

9. Adding WTL support to ATL project

10. How to add ATL support to WTL project?

11. Adding ADO support in ATL project

12. How to add MFC Support in existing project?


Powered by phpBB® Forum Software