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. C / C++ / MFC
  4. Platform independent library - Suggestions needed

Platform independent library - Suggestions needed

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsharpasp-netwpf
17 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.
  • C Christian Flutcher

    Rajesh R Subramanian wrote:

    Is there a specific reason to it? If you are using the VS, then why not use the Visual C++ compiler itself?

    Correct. But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms. Correct me if I am wrong.

    M Offline
    M Offline
    markkuk
    wrote on last edited by
    #8

    Using VC++ compiler on Windows has nothing to do with compiling on other platforms. If you write portable code, it will compile on any standard-conforming C++ compiler including VC++.

    C 1 Reply Last reply
    0
    • C Christian Flutcher

      Rajesh R Subramanian wrote:

      Is there a specific reason to it? If you are using the VS, then why not use the Visual C++ compiler itself?

      Correct. But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms. Correct me if I am wrong.

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #9

      Christian Flutcher wrote:

      But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms.

      Using the Visual C++ IDE necessarily not mean using the Windows API and Windows specific things like MFC, ATL, etc,. As another user pointed out, write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps. :)

      Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

      C 2 Replies Last reply
      0
      • M markkuk

        Using VC++ compiler on Windows has nothing to do with compiling on other platforms. If you write portable code, it will compile on any standard-conforming C++ compiler including VC++.

        C Offline
        C Offline
        Christian Flutcher
        wrote on last edited by
        #10

        Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?

        R 1 Reply Last reply
        0
        • C Christian Flutcher

          Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #11

          Christian Flutcher wrote:

          Okay. So I shoud not use any MFC classes. Use plain C++ classes for it, right?

          Right. Using the VC++ IDE not necessarily mean using MFC or ActiveX, which are specific to Windows. I just typed that out to you on another reply and you've posted it at the same time. :)

          Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            Christian Flutcher wrote:

            But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms.

            Using the Visual C++ IDE necessarily not mean using the Windows API and Windows specific things like MFC, ATL, etc,. As another user pointed out, write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps. :)

            Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

            C Offline
            C Offline
            Christian Flutcher
            wrote on last edited by
            #12

            Rajesh R Subramanian wrote:

            write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps

            Indeed. I am cleared now. Thanks. BTW, all these C++ things are bit confusing compared to C#, isn't it?

            R 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              Christian Flutcher wrote:

              But this class should compile with other compilers which are in LINUX and MAC. So I think, using VC++ compiler won't allow me to compile the same code on other platforms.

              Using the Visual C++ IDE necessarily not mean using the Windows API and Windows specific things like MFC, ATL, etc,. As another user pointed out, write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps. :)

              Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

              C Offline
              C Offline
              Christian Flutcher
              wrote on last edited by
              #13

              Last question, Is it possible to use reflection in standard C++? I need to invoke a class from it's name. It's trivial in C# .NET like Activator.CreateInstance will do, but what about C++?

              R 1 Reply Last reply
              0
              • C Christian Flutcher

                Rajesh R Subramanian wrote:

                write plain and portable C++ code, which is standards-conformant and that should compile on any standard C++ compiler. Hope that helps

                Indeed. I am cleared now. Thanks. BTW, all these C++ things are bit confusing compared to C#, isn't it?

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #14

                Christian Flutcher wrote:

                BTW, all these C++ things are bit confusing compared to C#, isn't it?

                Definitely NO. The managed world is a much larger mess when compared. There is a new .NET framework for download, every couple of days. There is a new technology every fortnight. By the time you finish mastering a new feature related to C#, that becomes obsolete. But that's not the case with C++. It is an old-timer language and exists for a "different" purpose. By all means, we should not compare C++ and .NET. One is a language and another is a framework. They both serve for different purposes and as I've said several times, they cannot rival each other on what they were built to do. But to my fortune, .NET was built with C++. Or just to be rude, "My compiler compiled your compiler". :) C++ is just C++. Things like MFC, VCF, etc., are frameworks that are built with and built to work with C++, which might be confusing at the beginning. I suggest that you master the actual language itself first and then move on to technologies that were built with C++. I talked too much - but hey, that's your fault. :-D

                Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                C 1 Reply Last reply
                0
                • C Christian Flutcher

                  Last question, Is it possible to use reflection in standard C++? I need to invoke a class from it's name. It's trivial in C# .NET like Activator.CreateInstance will do, but what about C++?

                  R Offline
                  R Offline
                  Rajesh R Subramanian
                  wrote on last edited by
                  #15

                  Christian Flutcher wrote:

                  Is it possible to use reflection in standard C++?

                  With standard C++, NO. Reflection is something that is within the managed (.NET) world. I would also recommend that you start a new thread if you have a "totally new" question. That would kinda fetch replies from more people and give more visibility to your query. :)

                  Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                  C 1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    Christian Flutcher wrote:

                    BTW, all these C++ things are bit confusing compared to C#, isn't it?

                    Definitely NO. The managed world is a much larger mess when compared. There is a new .NET framework for download, every couple of days. There is a new technology every fortnight. By the time you finish mastering a new feature related to C#, that becomes obsolete. But that's not the case with C++. It is an old-timer language and exists for a "different" purpose. By all means, we should not compare C++ and .NET. One is a language and another is a framework. They both serve for different purposes and as I've said several times, they cannot rival each other on what they were built to do. But to my fortune, .NET was built with C++. Or just to be rude, "My compiler compiled your compiler". :) C++ is just C++. Things like MFC, VCF, etc., are frameworks that are built with and built to work with C++, which might be confusing at the beginning. I suggest that you master the actual language itself first and then move on to technologies that were built with C++. I talked too much - but hey, that's your fault. :-D

                    Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                    C Offline
                    C Offline
                    Christian Flutcher
                    wrote on last edited by
                    #16

                    That's why I love C++ than anyother language and trying my best to learn it. People like you are a real inspiration.

                    Rajesh R Subramanian wrote:

                    I talked too much

                    :) I loved that.

                    1 Reply Last reply
                    0
                    • R Rajesh R Subramanian

                      Christian Flutcher wrote:

                      Is it possible to use reflection in standard C++?

                      With standard C++, NO. Reflection is something that is within the managed (.NET) world. I would also recommend that you start a new thread if you have a "totally new" question. That would kinda fetch replies from more people and give more visibility to your query. :)

                      Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche .·´¯`·->Rajesh<-·´¯`·. [Microsoft MVP - Visual C++]

                      C Offline
                      C Offline
                      Christian Flutcher
                      wrote on last edited by
                      #17

                      Okay. I should stop bothering you now. I will look into the reflection stuff later. Thanks for the help and have a great day.

                      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