当前位置:网站首页>D cannot use a non CTFE pointer
D cannot use a non CTFE pointer
2022-06-12 06:57:00 【fqbqrr】
__gshared const TEST = import(`onlineapp.d`);
extern(C) void main(){
__gshared bin_ptr = TEST.ptr;
}
Try this. :
__gshared bin_ptr;
shared static this()
{
// Put it in this ?
bin_ptr = TEST.ptr;// But this is the overall situation
}
__gshared const TEST = import(`onlineapp.d`);
extern(C) void main()
{
}
Yes -betterC, Have to use pragma(crt_constructor).
such :
__gshared immutable(char)* bin_ptr;
pragma(crt_constructor)
void init_ptr()
{
//pragma
bin_ptr = TEST.ptr;
}
__gshared TEST = import("this.d");
extern(C) void main()
{
}
边栏推荐
- Detailed explanation of convirt paper (medical pictures)
- Codeforces Round #793 (Div. 2) A B C
- Map to sort
- The difference between get and post and the code implementation of message board
- sql server2019安装到这步无法进行下一步了,如何解决?
- Tomato learning notes dvector and other basics
- 六月集训 第一日——数组
- Curry carries the fourth game of the warriors against the Celtics
- [easyexcel] easyexcel checks whether the header matches the tool class encapsulated in easyexcel, including the field verification function. You can use validate to verify
- Set [list] to find out the subscript of repeated elements in the list (display the position of the subscript)
猜你喜欢

Node. Detailed installation tutorial of CPM and cnpm (including error resolution)

platform driver

leetcode:剑指 Offer 67. 把字符串转换成整数【模拟 + 分割 +讨论】

SQL Server 2019 installation error. How to solve it

A journey of database full SQL analysis and audit system performance optimization

美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战

Solution: unsatisfieddependencyexception: error creating bean with name 'authaspect':

lambda 函数完美使用指南

4 expression

Throw away the ugly toast. The movable toast is more interesting
随机推荐
【图像去噪】基于偏微分方程(PDE)实现图像去噪附matlab代码
PHP development environment construction and database addition, deletion, modification and query
美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战
9 Sequence container
descheduler 二次调度让 Kubernetes 负载更均衡
Interview intelligence questions
六月集训 第五天——双指针
Troubleshooting of cl210openstack operation -- Chapter experiment
Redis supports data structure types
When SQL server2019 is installed, the next step cannot be performed. How to solve this problem?
XML special character escape
Jackson XML is directly converted to JSON without writing entity classes manually
(14)Blender源码分析之闪屏窗口显示软件版本号
SQL injection read / write file
Noi openjudge computes the n-th power of 2
Codeforces Round #793 (Div. 2) A B C
leetcode:890. 查找和替换模式【两个dict记录双射(set)】
企业微信官方 加解密库 PHP7版本报错 mcrypt_module_open 未定义方法 并且被PHP抛弃 解决方法使用 openssl解决
Cron expression and website generation
Matlab 6-DOF manipulator forward and inverse motion