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. CFile C++ exceptions in EVT3.0

CFile C++ exceptions in EVT3.0

Scheduled Pinned Locked Moved Mobile
helpcsharpc++visual-studiohardware
2 Posts 2 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.
  • M Offline
    M Offline
    Mike Landis
    wrote on last edited by
    #1

    I am writing for PocketPC 2002 using Embedded Visual Tools 3.0 (EVT3.0). The on-line documentation for CFile::Write() says "Write throws an exception in response to several conditions, including the disk-full condition." When I compile a try{ cfile->Write(...) } catch{...} code segment, the compiler flags the first of several cfile->Write() statements with: "... warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX". My problem is where to insert this switch in the EVT3.0 environment? I've found prerelease MSDN documentation on Structured Exception Handling , which says "Structured exception handling works with C and C++ source files. However, it is not specifically designed for C++. Although destructors for local objects will be called if you use structured exception handling in a C++ program (if you use the /GX compiler option), you can ensure that your code is more portable by using C++ exception handling. The C++ exception handling mechanism is more flexible, in that it can handle exceptions of any type." BUT, I think they're referring to Visual Studio 5 or 6, which has a slightly different Project interface than EVT3.0. I also get the following linker errors due to the try/catch segment: "error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) error LNK2001: unresolved external symbol ___CxxFrameHandler" Does anybody know how to make EVT3.0 happy here? Thanks Mike Landis

    J 1 Reply Last reply
    0
    • M Mike Landis

      I am writing for PocketPC 2002 using Embedded Visual Tools 3.0 (EVT3.0). The on-line documentation for CFile::Write() says "Write throws an exception in response to several conditions, including the disk-full condition." When I compile a try{ cfile->Write(...) } catch{...} code segment, the compiler flags the first of several cfile->Write() statements with: "... warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX". My problem is where to insert this switch in the EVT3.0 environment? I've found prerelease MSDN documentation on Structured Exception Handling , which says "Structured exception handling works with C and C++ source files. However, it is not specifically designed for C++. Although destructors for local objects will be called if you use structured exception handling in a C++ program (if you use the /GX compiler option), you can ensure that your code is more portable by using C++ exception handling. The C++ exception handling mechanism is more flexible, in that it can handle exceptions of any type." BUT, I think they're referring to Visual Studio 5 or 6, which has a slightly different Project interface than EVT3.0. I also get the following linker errors due to the try/catch segment: "error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@) error LNK2001: unresolved external symbol ___CxxFrameHandler" Does anybody know how to make EVT3.0 happy here? Thanks Mike Landis

      J Offline
      J Offline
      Joao Paulo Figueira
      wrote on last edited by
      #2

      Mike Landis wrote: Does anybody know how to make EVT3.0 happy here? You don't because eVC++ 3.0 does not support C++ exceptions, only structured exceptions. Regards, João Paulo Figueira Embedded MVP

      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