DMD的诡异"Previous Definition Different"错误

本文探讨使用D语言及Poseidon工具进行项目开发时遇到的一个具体编译错误——PreviousDefinitionDifferent,并提供了错误发生的代码示例及详细的错误信息。
我用poseidon新建一个全新工程
编译参数加入-g(就是加入调试信息),
试一试如下代码,就会有如"Previous Definition Different"

代码:

import std.c.windows.windows, std.c.windows.winsock;

static this(){
WSADATA wd;
}
int main (){
htons(9001);
return 0;
}

很奇怪...


完整的错误信息如下
Command >>> ReBuilding Project: stalk......
D:\myWay\env\d\env\dmd\bin\dmd.exe D:\myWay\D\stalk\stalk.d -ofstalk -
ID:\myWay\env\d\env\dmd\import D:\myWay\env\d\env\dmd\lib\WS2_32.LIB -
odobjs -g

D:\myWay\env\d\env\dmd\bin\..\..\dm\bin\link.exe objs\stalk,stalk,,D:
\myWay\env\d\env\dmd\lib\WS2_32.LIB+user32+kernel32/co/noi;

OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
D:\myWay\env\d\env\dmd\bin\..\lib\phobos.lib(winsock) Offset 2597FH
Record Type 00C3
Error 1: Previous Definition Different : _htons@4

提交了这个bug :) 见

http://d.puremagic.com/issues/show_bug.cgi?id=1737+
We consider the application of Koopman theory to nonlinear partial differential equations. We demonstrate that the observables chosen for constructing the Koopman operator are critical for en- abling an accurate approximation to the nonlinear dynamics. If such observables can be found, then the dynamic mode decomposition (DMD) algorithm can be enacted to compute a finite-dimensional approximation of the Koopman operator, including its eigenfunctions, eigenvalues and Koopman modes. We demonstrate simple rules of thumb for selecting a parsimonious set of observables that can greatly improve the approximation of the Koopman operator. Further, we show that the clear goal in selecting observables is to place the DMD eigenvalues on the imaginary axis, thus giving an objective function for observable selection. Judiciously chosen observables lead to physically interpretable spatio-temporal features of the complex system under consideration and provide a connection to manifold learning methods. Our method provides a valuable intermediate, yet inter- pretable, approximation to the Koopman operator that lies between the DMD method and the com- putationally intensive extended DMD (EDMD). We demonstrate the impact of observable selection, including kernel methods, and construction of the Koopman operator on several canonical, nonlinear PDEs: Burgers’ equation, the nonlinear Schrödinger equation, the cubic-quintic Ginzburg-Landau equation and a reaction-diffusion system. These examples serve to highlight the most pressing and critical challenge of Koopman theory: a principled way to select appropriate observables
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值