How to compile unsafe code in MonoDevelop 2.4
I am trying to compile unsafe code blocs in MonoDevelop 2.4. Apparently (Google search result) there is supposed to be a a tickbox under O开发者_StackOverflow中文版ptions->Build->General that allows the compiler to handle unsafe blocks but it is not there in 2.4. Does anybody know how to set MonoDevelop to compile unsafe code?
For version 2.4.2, select the project you want to turn on unsafe, note, this is important. You have to select one project, not the whole solution.
Right click on that project and then choose Option, under the Build -> general, under Language Options, check the "Allow 'unsafe' code".
Thank you for the guy above me to give me that hint.
In Solution view, on the left by default, click on your project's name. Then, in the menu bar, click on project, then click on '"thenameofyourproject" options' Then under Compilation or Build (I have a french version) you have a line named build I guess. Then you will see on the right written "complmentary options" or something like that.
Type in /unsafe and there you go
for Mono 5.9.6 it's slightly different:
- in the solution pane, select your project and open the options
- under "build", select "General"
- then in the "Language Options" category, check "Allow 'unsafe' code".
Right Click your project's name > Options > Build > Language Options & Check "Allow 'unsafe' code"
精彩评论