Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to compile with unsafe code?

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

  • NinjaTrader_DaveI
    replied
    Thank you -- I've added your vote.

    Leave a comment:


  • NJA_MC
    replied
    I think this is important, but unlikely it will impact me until after BETA.

    Leave a comment:


  • NinjaTrader_DaveI
    replied
    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.

    Leave a comment:


  • zweistein
    replied
    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

    Leave a comment:


  • ETFVoyageur
    replied
    OK -- thanks for the update.

    --EV

    Leave a comment:


  • NinjaTrader_Brett
    replied
    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.

    Leave a comment:


  • ETFVoyageur
    replied
    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

    Leave a comment:


  • NinjaTrader_Brett
    replied
    Sorry Koganam, but outside the scope we could provide at the moment.

    Leave a comment:


  • koganam
    replied
    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.

    Leave a comment:


  • ETFVoyageur
    replied
    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

    Leave a comment:


  • NinjaTrader_Brett
    replied
    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.

    Leave a comment:


  • ETFVoyageur
    started a topic How to compile with unsafe code?

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by timmbbo, Today, 08:59 AM
1 response
2 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by KennyK, 05-29-2017, 02:02 AM
2 responses
1,279 views
0 likes
Last Post marcus2300  
Started by fernandobr, Today, 09:11 AM
0 responses
0 views
0 likes
Last Post fernandobr  
Started by itrader46, Today, 09:04 AM
1 response
3 views
0 likes
Last Post NinjaTrader_Clayton  
Started by bmartz, 03-12-2024, 06:12 AM
5 responses
33 views
0 likes
Last Post NinjaTrader_Zachary  
Working...
X