‘壹’ 编译器为什么要自带API
API 是很宽泛的概念。
基本上来说,只要在 Windows 平台上的程序,都要直接或间接地调用 Windows API。
API 作为软件系统的编程接口,可以以库或其他各种方式出现。
而 API 的主要作用是把软件系统的功能暴露出来。类似 Windows API 这样的操作系统 API,是提供操作系统整个功能集合的最重要途径。操作系统 API 提供在这个操作系统上与任何东西互操作的能力:文件、内存、时钟、网络、图形、各种外设等等。API 通常还提供许多工具类的功能:操纵字符串、各种数据类型、时间日期等等。世界上最通用的操作系统 API 其实是传统 Unix 的 POSIX 接口(可移植操作系统接口),标准 C 的标准库其实就是这个接口的子集,所有类 Unix 操作系统所提供的操作系统 API,几乎都被称为 libc(对 C 库的传统称呼),所有操作系统所提供的自然操作系统接口都是以 C 语言执行库的方式提供的。Windows 操作系统上提供的 Windows API 与 POSIX 不同,但也是 C 函数库。另一方面,操作系统 API 通常还会保证二进制兼容性,即该系统的标准接口函数的调用地址通常保持不变,这使得通过汇编语言调用 API 方便了不少。
除了操作系统之外,又一定规模又希望进行二次开发的软件系统通常也提供其自己形式的 API。有的系统自己定义了语言,通常就提供该种语言的编程接口,而大多数一般也提供标准 C 编程接口 API。甚至有些网络分布式软件还提供 URI 远程访问形式的 API。
以提供编程能力为目的的编程语言和系统,几乎都要提供该语言特定的一组运行库,而这个运行库通常是以各种形式对底层操作系统 API 进行的封装,还有一些运行库是自己实现了一些功能并通过 API 暴露出来。VC 传统提供了 MFC、ATL 等类库,MFC 就是把 Windows API 的主要功能进行 C++ 封装的结果,而 VB 的库中除了对 Windows API 的封装之外还包括对 VB 程序十分必要的运行时组件,Java 库是独立于平台的字节码类库,但其中与底层机器交互的部分一般都是对其所在操作系统 API 的封装。
‘贰’ linux ctp api 怎么编译
1.CTP这类交易API,本身是用C++语言开发的,如果我们用C++来使用API,将没有任何兼容问题;而用其他语言,需要事先封装,如果CTP版本更新了,需要重复再封装一次,工作量比较大,而且还有兼容问题。做交易,稳定性是非常重要的。
2.各大投资公司,CTP相关岗位,基本招的是C++,且待遇相当不错。
3.股指的程序化交易量,早就超过了手工交易的资金量,而且以后程序化交易是个大趋势,所以掌握CTP开发技术十分有必要。
‘叁’ PFC与EDEM软件各有什么优缺点哪个软件比较容易学
DEM和PFC都是基于离散元算法,所以在原理上其实并无太大不同,主要是在应用上有差别。
1)、EDEM具有非常友好的图形用户界面,无论是前处理建模还是后处理获得各种数据图表,都非常方便;而PFC主要还是采用命令的操作方式。
2)、EDEM是全三维的离散元求解器,当然,如果想简化成二维也是可以的;PFC则是分为2D和3D两个版本。
3)、EDEM能够方便的进行各种非球形颗粒建模,采用球面填充法组建非球形颗粒。
4)、EDEM的并行计算效率明显优于PFC。
5)、EDEM能够支持CAD模型导入,能够非常快速的进行复杂几何结构建模。
6)、EDEM可以实现和CFD、FEA及MBD的耦合,处理更加复杂的问题。
7)、EDEM具有基于C++语言的二次开发接口(API接口),支持自定义复杂的动力学模型。
8)、PFC主要应用领域在岩土力学,EDEM目前应用范围非常广,重工、农机、制药、冶金、化工均有比较深入的应用。
当然,软件都在不断发展之中,任何优势和劣势都不是绝对的。同时,也要看使用者能将软件的功能发挥到什么程度。
‘肆’ 用vc建立windows32api程序,编译时显示不能打开头文件windows.h 怎么弄
自己找到include 文件夹 新建个 txt文件 名字改成 windows.h
然后复制 粘贴进去保存
/*++ BUILD Version: 0001 Increment this if a change has global effects
Copyright (c) 1985-1997, Microsoft Corporation
Mole Name:
windows.h
Abstract:
Master include file for Windows applications.
--*/
#ifndef _WINDOWS_
#define _WINDOWS_
#ifndef WINVER
#define WINVER 0x0400
#else
#if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400)
#error WINVER setting conflicts with _WIN32_WINNT setting
#endif
#endif
#if(WINVER >= 0x0500)
#pragma message ("")
#pragma message ("NOTE: WINVER has been defined as 0x0500 or greater which enables")
#pragma message ("Windows NT 5.0 and Windows 98 features. When these headers were released,")
#pragma message ("Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.")
#pragma message ("")
#pragma message ("For this release when WINVER is defined as 0x0500 or greater, you can only")
#pragma message ("build beta or test applications. To build a retail application,")
#pragma message ("set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk")
#pragma message ("to see if retail Windows NT 5.0 or Windows 98 headers are available.")
#pragma message ("")
#pragma message ("See the SDK release notes for more information.")
#pragma message ("")
#endif
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* If defined, the following flags inhibit definition
* of the indicated items.
*
* NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_
* NOVIRTUALKEYCODES - VK_*
* NOWINMESSAGES - WM_*, EM_*, LB_*, CB_*
* NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
* NOSYSMETRICS - SM_*
* NOMENUS - MF_*
* NOICONS - IDI_*
* NOKEYSTATES - MK_*
* NOSYSCOMMANDS - SC_*
* NORASTEROPS - Binary and Tertiary raster ops
* NOSHOWWINDOW - SW_*
* OEMRESOURCE - OEM Resource values
* NOATOM - Atom Manager routines
* NOCLIPBOARD - Clipboard routines
* NOCOLOR - Screen colors
* NOCTLMGR - Control and Dialog routines
* NODRAWTEXT - DrawText() and DT_*
* NOGDI - All GDI defines and routines
* NOKERNEL - All KERNEL defines and routines
* NOUSER - All USER defines and routines
* NONLS - All NLS defines and routines
* NOMB - MB_* and MessageBox()
* NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
* NOMETAFILE - typedef METAFILEPICT
* NOMINMAX - Macros min(a,b) and max(a,b)
* NOMSG - typedef MSG and associated routines
* NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
* NOSCROLL - SB_* and scrolling routines
* NOSERVICE - All Service Controller routines, SERVICE_ equates, etc.
* NOSOUND - Sound driver routines
* NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
* NOWH - SetWindowsHook and WH_*
* NOWINOFFSETS - GWL_*, GCL_*, associated routines
* NOCOMM - COMM driver routines
* NOKANJI - Kanji support stuff.
* NOHELP - Help engine interface.
* NOPROFILER - Profiler interface.
* NODEFERWINDOWPOS - DeferWindowPos routines
* NOMCX - Modem Configuration Extensions
*/
#if defined(RC_INVOKED) && !defined(NOWINRES)
#include <winresrc.h>
#else
#if defined(RC_INVOKED)
/* Turn off a bunch of stuff to ensure that RC files compile OK. */
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_MIPS_) && !defined(_X86_) && defined(_M_IX86)
#define _X86_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MRX000)
#define _MIPS_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_ALPHA)
#define _ALPHA_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_PPC)
#define _PPC_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_M68K)
#define _68K_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MPPC)
#define _MPPC_
#endif
#ifndef _MAC
#if defined(_68K_) || defined(_MPPC_)
#define _MAC
#endif
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(disable:4001)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#pragma warning(disable:4514)
#endif
#include <excpt.h>
#include <stdarg.h>
#endif /* RC_INVOKED */
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#ifdef _MAC
DECLARE_HANDLE(HKEY);
typedef HKEY *PHKEY;
#endif
#if !defined(_MAC) || defined(_WIN32NLS)
#include <winnls.h>
#endif
#ifndef _MAC
#include <wincon.h>
#include <winver.h>
#endif
#if !defined(_MAC) || defined(_WIN32REG)
#include <winreg.h>
#endif
#ifndef _MAC
#include <winnetwk.h>
#endif
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>
#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>
#include <mswsock.h>
#else
#include <winsock.h>
#endif /* _WIN32_WINNT >= 0x0400 */
#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#endif
#ifndef NOGDI
#include <commdlg.h>
#ifndef _MAC
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif /* !INC_OLE1 */
#endif /* !MAC */
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */
#ifdef _MAC
#include <winwlm.h>
#endif
#ifdef INC_OLE2
#include <ole2.h>
#endif /* INC_OLE2 */
#ifndef _MAC
#ifndef NOSERVICE
#include <winsvc.h>
#endif
#if(WINVER >= 0x0400)
#ifndef NOMCX
#include <mcx.h>
#endif /* NOMCX */
#ifndef NOIME
#include <imm.h>
#endif
#endif /* WINVER >= 0x0400 */
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's a stupid warning anyway. */
#endif
#endif /* RC_INVOKED */
#endif /* RC_INVOKED */
#endif /* _INC_WINDOWS */
#endif /* _WINDOWS_ */