今天试用SQLAPI,用Mysql数据库,编译时发现一个错误:
- Error 1 error C2146: syntax error : missing ';' before identifier 'fd' d:\sqlapi\mysql_com.h 192
- Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\sqlapi\mysql_com.h 192
- Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\sqlapi\mysql_com.h 192
- Error 4 error C2065: 'SOCKET' : undeclared identifier d:\sqlapi\mysql_com.h 367
- Error 5 error C2146: syntax error : missing ')' before identifier 's' d:\sqlapi\mysql_com.h 367
- Error 6 error C2059: syntax error : ')' d:\sqlapi\mysql_com.h 368
这个的解决办法很简单:
在包含myAPI.h之前包含winsock2.h即可。
如下:
-
#include"stdafx.h"
-
#include<WinSock2.h>
-
#include"myAPI.h"
分享到:
相关推荐
其实,这是一个非常容易解决掉的问题。在我看来,似曾相识,呵呵,最近学JavaScript...Parse error: syntax error, unexpected T_VAR in D:\Apache2.2\htdocs\shirdrn\page\p2\pageUtil.inc on line 34 我在测试:在
JS错误Uncaught SyntaxError: Cannot use import statement outside a module< 分析及解决方法 错误信息: 错误分析: HTML 网页中,浏览器通过 script 标签加载 JavaScript 脚本。由于浏览器脚本的默认语言是 ...
Python错误: SyntaxError: Non-ASCII character解决办法 (1)问题描述 在写Python代码的过程中,有用到需要输出中文的地方,但是运行后发现上述错误。SyntaxError: Non-ASCII character ‘\xe4’ in file ./...
e:\newpaintgraph\newpaintgraph\newpaintgraphview.h(23) : error C2143: syntax error : missing ';' before '*' e:\newpaintgraph\newpaintgraph\newpaintgraphview.h(23) : error C2501: 'CNewPaintGraphDoc' : ...
qt vs编译报错error C2146: syntax error : missing ';' before identifier 'PVOID64',替换C:\Program Files (x86)\Windows Kits\8.1\Include\um中的winnt.h文件即可
c:\wpdpack\include\pcap-stdinc.h(79) : error C2144: syntax error : missing ';' before type 'unsigned int' c:\wpdpack\include\pcap-stdinc.h(79) : fatal error C1004: unexpected end of file found
d:\microsoft directx sdk (august 2008)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' d:\microsoft directx sdk (august 2008)\include\dsound.h(305) : ...
d:\microsoft directx sdk (august 2008)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' d:\microsoft directx sdk (august 2008)\include\dsound.h(305) : ...
python——pip install xxx报错SyntaxError: invalid syntax 在安装好python后,进入python运行环境后,因为我要用pip安装开发Web App需要的第三方库,执行pip install aiohttp,发现会报错SyntaxError: invalid ...
jquery中ajax请求后台数据成功后既不执行success也不执行error,此外系统报错:Uncaught SyntaxError: Unexpected identifier at Object.success,但后台能够返回数据,原代码如下: var source=[]; $.ajax({ ...
同事在使用python3操作...一看错误提示就是语法错误,还在%附近,笔者之前写过一篇python3操作数据库的文章中,提到过,sqlite的占位符请使用 ?,重要的事情就不说三遍了。获取更多知识,可以关注我的公众号:码农小麦
e:\test\testview.h(21) : error C2143: syntax error : missing ';' before '*' e:\test\testview.h(21) : error C2501: 'CTestDoc' : missing storage-class or type specifiers e:\test\testview.h(21) : error C...
二、开启入口文件时,提示以下错误 `basedir=$(dirname $(echo $0 | sed -e 's,\\,/,g') SyntaxError: missing......` 三、解决办法,因为使用了express框架,需要安装 express 即可 npm install express --save-...
Python_field_calculator 针对ArcGis10中字段计算器只支持Python语言的情况,现在特别上传Python版的资料,希望对大家有帮助!
错误原因 在设置npm的cache和predix时,因为使用参考其他教程照抄,而没有修改为本机对应路径,本机上并没有这个地址,因此造成了...Error: UNKNOWN: unknown error, mkdir ‘D:\Develop\nodejs\node_global’ at Error
这里就整理一个代码编写调试问题,错误如下: Parse error: syntax error, unexpected $end in D:\xampp\htdocs\guestBook\guestBook.php on line 330 看看程序 330行,代码最后一行,这有什么错误?google搜,找到...