• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    BrettNinjaTrader Product Management

    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.
          BrettNinjaTrader Product Management

          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.
              BrettNinjaTrader Product Management

              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 CiprianV, Today, 03:11 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post CiprianV  
                        Started by learningnt, Yesterday, 10:21 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post learningnt  
                        Started by GMiller64, Yesterday, 01:13 PM
                        3 responses
                        10 views
                        0 likes
                        Last Post GMiller64  
                        Started by itrader46, Yesterday, 12:51 PM
                        5 responses
                        43 views
                        0 likes
                        Last Post rithikanth  
                        Started by hemlock, Yesterday, 11:45 AM
                        3 responses
                        15 views
                        0 likes
                        Last Post NinjaTrader_PatrickG  
                        Working...
                        X