Compile error atlapp.h can not be found

This is a discussion on Compile error atlapp.h can not be found within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, I am compiling the client part program of COM reentrancy problem. Does anyone know what is the problem? ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    Compile error atlapp.h can not be found

    Hello everyone,


    I am compiling the client part program of COM reentrancy problem. Does anyone know what is the problem?

    (BTW: server part program can compile, link and register ok.)

    I am using MSVC 2008 + x64 Windows Server 2003. Is it because the code is old and in the newest SDK we need some code change to migrate?

    http://www.codeproject.com/KB/COM/sta_issues.aspx

    1>stdafx.cpp
    1>d:\exercises\stareentr\stareentr\client\stdafx.h (16) : fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory

    1>Compiling...
    1>client.cpp
    1>d:\exercises\stareentr\stareentr\client\client.c pp(4) : fatal error C1083: Cannot open precompiled header file: '.\Debug/client.pch': No such file or directory


    thanks in advance,
    George

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    When will you remember that COM and ATL are Win32-specific things?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Sorry, I should post it to Windows Programming forum. :-)

    Quote Originally Posted by CornedBee View Post
    When will you remember that COM and ATL are Win32-specific things?

    regards,
    George

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    1>Compiling...
    1>client.cpp
    1>d:\exercises\stareentr\stareentr\client\client. c pp(4) : fatal error C1083: Cannot open precompiled header file: '.\Debug/client.pch': No such file or directory
    I can fix this one quickly. Turn off precompiled headers. Thankfully we do not use these at work. They cause a lot of issues.

    1>stdafx.cpp
    1>d:\exercises\stareentr\stareentr\client\stdafx. h (16) : fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
    Usually when VS installs it also installs ATL which means it also 'knows' where to find the ATL headers and libs. AFAIK you do not have to specify in project properties where these are. The same holds true for Win32 API. Not sure why it cannot find this. Perhaps an install problem or perhaps you did not tell the installer to install it. I don't think it's normally installed with a standard install so you may need to put the 2008 CD in and attempt to reinstall it.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Bubba,


    I have found the "Precompiled Headers" from project properties. There is an item called "Precompiled Header File". Do you mean make it empty?

    What is the function of Precompiled header file?

    Quote Originally Posted by Bubba View Post
    I can fix this one quickly. Turn off precompiled headers. Thankfully we do not use these at work. They cause a lot of issues.

    regards,
    George

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    They reduce compilation time.

    But I think the fix is to make sure you see #include "stdafx.h" at the top of your cpp files.

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Bubba,


    I have got almost all of your ideas. Since precompiled header does not direct relates to my question. I will start another thread to discuss.

    It is appreciated if you could help and we continue to discuss there. URL,

    http://cboard.cprogramming.com/showt...499#post735499

    Quote Originally Posted by Bubba View Post
    They reduce compilation time.

    But I think the fix is to make sure you see #include "stdafx.h" at the top of your cpp files.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Symbol file not found for *.ko
    By yanglei_fage in forum Linux Programming
    Replies: 3
    Last Post: 03-30-2009, 09:48 AM
  2. Have no idea how to compile c++, please help (newbie qn)
    By rholloway in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2008, 08:31 AM
  3. progarm doesnt compile
    By kashifk in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2003, 06:54 PM
  4. Going out of scope
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 10-12-2003, 07:27 PM
  5. Replies: 4
    Last Post: 11-14-2001, 10:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21