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. General Programming
  3. Managed C++/CLI
  4. Strange compile problem

Strange compile problem

Scheduled Pinned Locked Moved Managed C++/CLI
helpquestion
3 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.
  • Y Offline
    Y Offline
    Yaakov Davis
    wrote on last edited by
    #1

    I have a managed class called ConfigManager, with a static method: static void StartService() {...}. When I compile, the compiler changes the method name to static void StartService**A**() {..}. If I change the method name to StartServiceBlaBla, the compiler doesn't change it. Any one has an idea? Thanks, Yaakov

    A 1 Reply Last reply
    0
    • Y Yaakov Davis

      I have a managed class called ConfigManager, with a static method: static void StartService() {...}. When I compile, the compiler changes the method name to static void StartService**A**() {..}. If I change the method name to StartServiceBlaBla, the compiler doesn't change it. Any one has an idea? Thanks, Yaakov

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      When you include windows.h it defines some macros. One of them is like this: #define StartService StartServiceA This is used to replace the windows function StartService with the non-unicode version of it. To get around this problem you can either rename your function or include the following line after you include windows.h. #undef StartService

      A 1 Reply Last reply
      0
      • A Anonymous

        When you include windows.h it defines some macros. One of them is like this: #define StartService StartServiceA This is used to replace the windows function StartService with the non-unicode version of it. To get around this problem you can either rename your function or include the following line after you include windows.h. #undef StartService

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks. Yaakov.

        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