Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to compile with unsafe code?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to compile with unsafe code?

    How do I compile with unsafe code?

    Trying to do so gets the correct error message: Unsafe code may only appear if compiling with /unsafe.

    My problem is that I do not know where to set /unsafe.

    --EV

    #2
    We use an internal compiler calls therefor not supported. To do this for now you would have to compile a DLL externally and reference it in. I'll add a vote for the unsafe option.

    Comment


      #3
      Thanks, Brett.

      I do think NT should support that, but it is not crucial for me right now. Perhaps the point will be moot when NT gets to where the compilation can be done in Visual Studio.

      --EV

      Comment


        #4
        Originally posted by NinjaTrader_Brett View Post
        We use an internal compiler calls therefor not supported. To do this for now you would have to compile a DLL externally and reference it in. I'll add a vote for the unsafe option.
        Do we get to know what that internal compiler call is? I have been trying unsuccessfully to figure it out since NT7, so that I can use it in my installer for my goods. The current method I use is just too crude a hack for me to even describe: I am too ashamed of just how bad a hack it is.

        Comment


          #5
          Sorry Koganam, but outside the scope we could provide at the moment.

          Comment


            #6
            Brett,

            What's the latest on when we'll be able to compile directly in Visual Studio? Aside from convenience, that would allow breakpoints active from the get-go instead of only after a human has time to attach to the process.

            --EV

            Comment


              #7
              Wont be in NT8 beta. Would be on the list to look into what would be required to do that until after we are through open beta but not sooner.

              Comment


                #8
                OK -- thanks for the update.

                --EV

                Comment


                  #9
                  unsafe code

                  unsafe code will be essentially use of pointers in C, C++ or asm.

                  For sure you can compile an external dll , but then you have to interface to C code.

                  In the past I used C++ managed code with unsafe code fragments to interface with the JNI (java native interface). Then you can call your C++ managed code exactly the same way as you would call a C# class/function.
                  Be aware that you need all Visual Studio 8 patches otherwise the managed C++ code will not always compile.

                  Andreas

                  Comment


                    #10
                    EV, I've added your vote to SFT-501 for supporting the compilation of unsafe code. If anyone else would like to add their vote, please let me know so we can get an idea of the demand for this feature/ability.
                    Dave I.NinjaTrader Product Management

                    Comment


                      #11
                      I think this is important, but unlikely it will impact me until after BETA.

                      Comment


                        #12
                        Thank you -- I've added your vote.
                        Dave I.NinjaTrader Product Management

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by elirion, Today, 01:36 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post elirion
                        by elirion
                         
                        Started by gentlebenthebear, Today, 01:30 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post gentlebenthebear  
                        Started by samish18, Yesterday, 08:31 AM
                        2 responses
                        9 views
                        0 likes
                        Last Post elirion
                        by elirion
                         
                        Started by Mestor, 03-10-2023, 01:50 AM
                        16 responses
                        389 views
                        0 likes
                        Last Post z.franck  
                        Started by rtwave, 04-12-2024, 09:30 AM
                        4 responses
                        33 views
                        0 likes
                        Last Post rtwave
                        by rtwave
                         
                        Working...
                        X