Visual Studio challenges

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeritind
    Rookie
    • Jan 2014
    • 3

    Visual Studio challenges

    Hi,

    I'm entertaining the possibility of porting to Windows Phone and I'm trying to get over some challenges without making significant changes to the source.

    I think it would be really helpful for porting to other platforms if the main engine can be compiled as a static lib or dll and then referenced in a UI layer as opposed to having it all mashed together with multiple makes/.c files in the root.

    Following that thought, I've attempted to do just that.

    Right now the two biggest challenges I'm facing are:

    1) using the property name of "class" on player and getting it to compile without redefining the keyword "class"

    2) C99 designated initializers (primary used in declaring static structs of test data. visual studio and several other compilers don't support C99).

    I really think it would be ideal to be able to maintain everything in one solution/workspace in an IDE for organization but it looks like as it stands I'd have to compile an angband source dll using a separate compiler and then reference the assembly in my main app.

    Thoughts?
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    Hahaha, the newly-appointed maintainer is working on doing a UI/core split to accomplish basically exactly what you're looking for: a clean disconnect between the engine and the user interface. Once that's accomplished (no timeline, sadly; everyone's a volunteer here!) it should be straightforward to build just the engine as a DLL and then use it with whatever front-end you like.

    Best of luck with your work though!

    Comment

    • jeritind
      Rookie
      • Jan 2014
      • 3

      #3
      Interesting...I'll take a stab at it then I guess!

      Comment

      • fph
        Veteran
        • Apr 2009
        • 1030

        #4
        Re #1, GLIB for instance (which is another pure-C project that would like to use the word "class" for internal purposes) has solved the problem by renaming all instances to "klass" in their source code.
        --
        Dive fast, die young, leave a high-CHA corpse.

        Comment

        • jeritind
          Rookie
          • Jan 2014
          • 3

          #5
          Yeah, I renamed it to class_ based on this guy's off-the-cuff comment in this thread:
          I am having trouble writing C++ code that uses a header file designed for a C file. In particular, the header file used a variable name called class: int BPY_class_validate(const char *class_type,


          New best practice????

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎