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. Design and Architecture
  4. Code portability - .NET/Unix

Code portability - .NET/Unix

Scheduled Pinned Locked Moved Design and Architecture
csharpquestionc++dotnetdesign
8 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.
  • V Offline
    V Offline
    vsyam
    wrote on last edited by
    #1

    Hi, We have an application coded in C++ that runs on Windows. We also have an API that can be used by third party Unix apps. So the current architecture (in simplified form) is: UI (in VC++) --> Functionality Dll (in C++) Third party Unix client --> API --> Functionality Dll (C++ code recompiled as shared object in Unix) We are now planning to redesign the UI in C#.Net. The question before us is how do we maintain the code base (of the Functionality Dll) common to both Unix API and Windows UI? If we just recompile the func dll with /clr switch and use it in .NET, will there be any loss in performance for the main app(func dll has a lot of math calculations involved)? Guys, please help. Hope I was clear. Thank you in advance.

    W 1 Reply Last reply
    0
    • V vsyam

      Hi, We have an application coded in C++ that runs on Windows. We also have an API that can be used by third party Unix apps. So the current architecture (in simplified form) is: UI (in VC++) --> Functionality Dll (in C++) Third party Unix client --> API --> Functionality Dll (C++ code recompiled as shared object in Unix) We are now planning to redesign the UI in C#.Net. The question before us is how do we maintain the code base (of the Functionality Dll) common to both Unix API and Windows UI? If we just recompile the func dll with /clr switch and use it in .NET, will there be any loss in performance for the main app(func dll has a lot of math calculations involved)? Guys, please help. Hope I was clear. Thank you in advance.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Not sure if I understood your problem correctly, but perhaps this would help you: http://en.wikipedia.org/wiki/Mono_(software)[^]

      The need to optimize rises from a bad design. My articles[^]

      L 1 Reply Last reply
      0
      • W Wendelius

        Not sure if I understood your problem correctly, but perhaps this would help you: http://en.wikipedia.org/wiki/Mono_(software)[^]

        The need to optimize rises from a bad design. My articles[^]

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Mika Wendelius wrote:

        Not sure if I understood your problem correctly

        Me either. However, I suspect he is looking for a two word book report on War and Piece. ;)

        led mike

        W 1 Reply Last reply
        0
        • L led mike

          Mika Wendelius wrote:

          Not sure if I understood your problem correctly

          Me either. However, I suspect he is looking for a two word book report on War and Piece. ;)

          led mike

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          That's an excellent interpretation, why didn't I figure it out :-D

          The need to optimize rises from a bad design. My articles[^]

          V 1 Reply Last reply
          0
          • W Wendelius

            That's an excellent interpretation, why didn't I figure it out :-D

            The need to optimize rises from a bad design. My articles[^]

            V Offline
            V Offline
            vsyam
            wrote on last edited by
            #5

            Sorry for confusing you guys :) As you must have guessed by now, I m new to the interoperability stuff :confused:. The questions on my mind are: does compiling existing C++ code with /CLR switch automatically emit MSIL for all the unmanaged code written? Will we get to keep the existing C++ code same across Unix and .Net(Windows), just like the way it is now (just needing recompilation)? If yes, is there any performance loss to it? I know there is a chance that I am still not clear, but at least I added one more question to what I already asked. Perhaps you can have a clue where I m leading/misleading myself.

            V W 2 Replies Last reply
            0
            • V vsyam

              Sorry for confusing you guys :) As you must have guessed by now, I m new to the interoperability stuff :confused:. The questions on my mind are: does compiling existing C++ code with /CLR switch automatically emit MSIL for all the unmanaged code written? Will we get to keep the existing C++ code same across Unix and .Net(Windows), just like the way it is now (just needing recompilation)? If yes, is there any performance loss to it? I know there is a chance that I am still not clear, but at least I added one more question to what I already asked. Perhaps you can have a clue where I m leading/misleading myself.

              V Offline
              V Offline
              vsyam
              wrote on last edited by
              #6

              Btw, Mika, Mono seems a good option. But the API + func dll we have run in IBM AIX, SCO UnixWare, HP HP-UX, Sun Solaris apart from Linux. I dont find any mention of these on the Mono website.

              W 1 Reply Last reply
              0
              • V vsyam

                Sorry for confusing you guys :) As you must have guessed by now, I m new to the interoperability stuff :confused:. The questions on my mind are: does compiling existing C++ code with /CLR switch automatically emit MSIL for all the unmanaged code written? Will we get to keep the existing C++ code same across Unix and .Net(Windows), just like the way it is now (just needing recompilation)? If yes, is there any performance loss to it? I know there is a chance that I am still not clear, but at least I added one more question to what I already asked. Perhaps you can have a clue where I m leading/misleading myself.

                W Offline
                W Offline
                Wendelius
                wrote on last edited by
                #7

                Would these links be any use to you: - Pure and Verifiable Code[^] - Port from UNIX to Win32[^]

                The need to optimize rises from a bad design. My articles[^]

                1 Reply Last reply
                0
                • V vsyam

                  Btw, Mika, Mono seems a good option. But the API + func dll we have run in IBM AIX, SCO UnixWare, HP HP-UX, Sun Solaris apart from Linux. I dont find any mention of these on the Mono website.

                  W Offline
                  W Offline
                  Wendelius
                  wrote on last edited by
                  #8

                  The list for platforms isn't very long, see. http://www.mono-project.com/Supported_Platforms[^] Also have alook at http://mono-project.com/FAQ:_General#Availability[^]

                  The need to optimize rises from a bad design. My articles[^]

                  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