编译特定机器的一些代码,如mac和windows [英] compile some code for specific machine like mac and windows

查看:65
本文介绍了编译特定机器的一些代码,如mac和windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.csproj和代码中,我知道如何有条件地编译跨平台< / g>图书馆例如 

in .csproj and in the code, I know how to conditionally compile for cross platform</g> libraries eg 

#if net40

#if net40

.....

#else 

#else 

.....

但如果我< / g>想为mac或windows编译?有没有像这样的方式

but what if i</g> want to compile for mac or windows? is there a way like maybe

#if mac

....

#elif wins

#elif wins

.....

??

我正在尝试开发一个跨平台< / g> ;图书馆所以想知道是否可以这样做。

I am trying to develop a cross platform</g> library so was wondering if it can be done.

推荐答案

这是错误的论坛。如果这是关于C ++那么这应该在那个论坛。

This is the wrong forum. If this is about C++ then this should be in that forum.

请参阅以下.Net。


这篇关于编译特定机器的一些代码,如mac和windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆