修复VC编译错误

main
Matthew 2 years ago
parent d26041a870
commit 1825e84f77

@ -12,3 +12,14 @@ make -j8
make install
增加文件: /etc/ld.so.conf.d/OpenCV.conf 文件内容为
/usr/local/lib64
保存后执行命令 ldconfig
编译iec104
在src同级目录下建两个子目录
obj bin
然后进入 src 目录,执行命令 make

@ -18,8 +18,9 @@
#include <mysql/mysql.h>
#ifdef _WIN32
//#pragma comment(lib,"ociliba.lib")
#pragma comment(lib,"libmysql.lib")
//#pragma comment(lib,"ociliba.lib")
// #pragma comment(lib,"libmysql.lib")
#pragma comment(lib,"mariadbclient.lib")
#endif
typedef std::list<MYSQL *> CONNECTION_HANDLE_LIST;

@ -30,7 +30,11 @@
//OpencvDirTraverse.cpp : Defines the entry point for the console application.
#ifdef _WIN32
#pragma comment(lib,"opencv_world300d.lib")
#ifdef _DEBUG
#pragma comment(lib,"opencv_world3416d.lib")
#else
#pragma comment(lib,"opencv_world3416.lib")
#endif
//#pragma comment(lib,"opencv_ts300d.lib")
#endif

@ -26,7 +26,11 @@
//OpencvDirTraverse.cpp : Defines the entry point for the console application.
#ifdef _WIN32
#pragma comment(lib,"opencv_world300d.lib")
#ifdef _DEBUG
#pragma comment(lib,"opencv_world3416d.lib")
#else
#pragma comment(lib,"opencv_world3416.lib")
#endif
#endif
using namespace std;

@ -176,7 +176,7 @@ int TTcpSocket::tcpOpenServer(const char *ip,unsigned short port)
return ErrSetSockOpt ;
}
if((iRet = bind(m_sockfd, (struct sockaddr*)&fsock, sizeof(fsock))) == -1)
if((iRet = ::bind(m_sockfd, (struct sockaddr*)&fsock, sizeof(fsock))) == -1)
{
vPrtLogMsg(LOG_ERROR, ErrBindFail, "socket bind error,sockid:%d msg:%s.",m_sockfd, strerror(errno)) ;
tcpCloseSocket(m_sockfd) ;

@ -1604,7 +1604,7 @@ Mat dst, detected_edges;
int edgeThresh = 1;
int lowThreshold = 77;
int max_lowThreshold = 100;
int ratio = 3;
int thresholdRatio = 3;
int kernel_size = 3;
vector<Vec3f> circles;
@ -1625,8 +1625,8 @@ void CannyThreshold(int, void*)
blur(src_gray, detected_edges, Size(3, 3));
/// 运行Canny算子
Canny(detected_edges, detected_edges, lowThreshold, lowThreshold*ratio, kernel_size);
//printf("LowThresold : %d -- %d \n", lowThreshold, lowThreshold*ratio);
Canny(detected_edges, detected_edges, lowThreshold, lowThreshold*thresholdRatio, kernel_size);
//printf("LowThresold : %d -- %d \n", lowThreshold, lowThreshold*thresholdRatio);
/// 使用 Canny算子输出边缘作为掩码显示原图像,声明一个三通道图像像素值全为0用来将霍夫变换检测出的圆画在上面
dst = Scalar::all(0);

@ -152,13 +152,15 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;CV__ENABLE_C_API_CTORS;CV__SKIP_MESSAGE_MALFORMED_C_API_CTORS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Shlwapi.lib;Secur32.lib;Crypt32.lib;zlibd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

Loading…
Cancel
Save