Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. It Just Sucks!

It Just Sucks!

Scheduled Pinned Locked Moved Mobile
c++helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    Facts: 0) Using EVC3 on Win2K Pro 1) I have the following project folder structure:

    PocketApp
    |
    +-----CommonSourceCode

    1. The app uses MFC, and contains the standard "stdafx.h" file. 3) The "CommonSourceCode" folder contains code that can be used by other apps, but right now, no sharing of code is going on. 4) I added some code to the "CommonSourceCode" folder that includes the following lines at the top of the CPP file:

    #ifdef POCKET_APP
    #include "stdafx.h"
    #else
    #include "winbase.h"
    #endif

    1. The compiler complains that the "#else" is unexpected. So I tried this:

    #ifdef POCKET_APP
    #include "stdafx.h"
    #endif
    #ifndef POCKET_APP
    #include "winbase.h"
    #endif

    1. The compiler now complains that the #endif is unexpected. 7) I also tried making the "stdafx.h" a macro itself, and still the same errors. 8) The only way I can #include stdafx.h is by NOT using macros to determine if the inclusion is the desired one. 9) This sucks. Microsoft sucks. Windows CE sucks. EVC3 sucks. I can't upgrade to EVC4 (and even if I could, I doubt they would have fixed this problem). Am I missing something here? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 "You won't like me when I'm angry..." - Dr. Bruce Banner Please review the Legal Disclaimer in my bio. ------- signature ends
    J J 2 Replies Last reply
    0
    • realJSOPR realJSOP

      Facts: 0) Using EVC3 on Win2K Pro 1) I have the following project folder structure:

      PocketApp
      |
      +-----CommonSourceCode

      1. The app uses MFC, and contains the standard "stdafx.h" file. 3) The "CommonSourceCode" folder contains code that can be used by other apps, but right now, no sharing of code is going on. 4) I added some code to the "CommonSourceCode" folder that includes the following lines at the top of the CPP file:

      #ifdef POCKET_APP
      #include "stdafx.h"
      #else
      #include "winbase.h"
      #endif

      1. The compiler complains that the "#else" is unexpected. So I tried this:

      #ifdef POCKET_APP
      #include "stdafx.h"
      #endif
      #ifndef POCKET_APP
      #include "winbase.h"
      #endif

      1. The compiler now complains that the #endif is unexpected. 7) I also tried making the "stdafx.h" a macro itself, and still the same errors. 8) The only way I can #include stdafx.h is by NOT using macros to determine if the inclusion is the desired one. 9) This sucks. Microsoft sucks. Windows CE sucks. EVC3 sucks. I can't upgrade to EVC4 (and even if I could, I doubt they would have fixed this problem). Am I missing something here? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 "You won't like me when I'm angry..." - Dr. Bruce Banner Please review the Legal Disclaimer in my bio. ------- signature ends
      J Offline
      J Offline
      Joao Paulo Figueira
      wrote on last edited by
      #2

      Try this: Open the project settings (Alt-F7), go to the C++ tab, select the "Precompiled Headers" category and select "Not using precompiled headers". If your code now compiles correctly, you are suffering from stdafx / precompiled headers blues (yeah, I know it sucks). What can you do to retain the precompiled header functionality? Try to remove all nonessential stuff out of stdafx.h and copy it into another include file. Leave there only microsoft-generated stuff. Always include stdafx.h unconditionally. Well, I hope I made some sense... Regards, João Paulo

      1 Reply Last reply
      0
      • realJSOPR realJSOP

        Facts: 0) Using EVC3 on Win2K Pro 1) I have the following project folder structure:

        PocketApp
        |
        +-----CommonSourceCode

        1. The app uses MFC, and contains the standard "stdafx.h" file. 3) The "CommonSourceCode" folder contains code that can be used by other apps, but right now, no sharing of code is going on. 4) I added some code to the "CommonSourceCode" folder that includes the following lines at the top of the CPP file:

        #ifdef POCKET_APP
        #include "stdafx.h"
        #else
        #include "winbase.h"
        #endif

        1. The compiler complains that the "#else" is unexpected. So I tried this:

        #ifdef POCKET_APP
        #include "stdafx.h"
        #endif
        #ifndef POCKET_APP
        #include "winbase.h"
        #endif

        1. The compiler now complains that the #endif is unexpected. 7) I also tried making the "stdafx.h" a macro itself, and still the same errors. 8) The only way I can #include stdafx.h is by NOT using macros to determine if the inclusion is the desired one. 9) This sucks. Microsoft sucks. Windows CE sucks. EVC3 sucks. I can't upgrade to EVC4 (and even if I could, I doubt they would have fixed this problem). Am I missing something here? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 "You won't like me when I'm angry..." - Dr. Bruce Banner Please review the Legal Disclaimer in my bio. ------- signature ends
        J Offline
        J Offline
        Jonas Larsson
        wrote on last edited by
        #3

        John Simmons / outlaw programmer wrote: Am I missing something here? My guess is that something gets screwed with the pre-compiled header directive. Turn off precompiled headers for your \CommonSourceCode files in your mfc project. That should atleast make it compile. John Simmons / outlaw programmer wrote: Microsoft sucks. Windows CE sucks. EVC3 sucks I know the feeling. I get to this state about once a month. ;) Jonas “Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups