Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些包含在预处理器指令中的 C 代码:
#if defined(TEST) // do stuff #endif
我需要do stuff通过 ctypes 从 Python 执行 - 有什么方法可以定义TEST吗?
do stuff
TEST
ctypes这与python完全无关。ctypes 仅处理已编译的库并允许您调用其中的函数。如果你想执行一个只有条件定义的函数,你必须使用正确的指令集编译库。
ctypes
在 gcc 中,这将类似于gcc -D TEST <rest as usual>
gcc -D TEST <rest as usual>
我正在使用 jQuery 来让一些 div 在我的本地服务器上显示/隐藏。现在它在测试页面上工作正常但是当我每次使用时将它放入我的测试应用程序(用 PHP 和 HTML 编写)
<a href="#"
创建一个钩子,它实际上也链接了 locahost