『壹』 編譯器為什麼要自帶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_ */