error LNK2019: 无法解析的外部符号; public: static class ConnectionPool * __cdecl ConnectionPool::getConnectionPool(void) (?getConnectionPool@ConnectionPool@@SAPEAV1@XZ),函数;void __cdecl `dynamic initializer

xinyuan shen 1 Reputation point
2022-05-24T07:23:19.203+00:00

ConnectionPool* cp = ConnectionPool::getConnectionPool(); //创建数据库连接池
shared_ptr<Connection> sp = cp->getConnection();
char sql[1024] = { 0 };
snprintf(sql, SQL_MAX, "INSERT INTO receiveData VALUES('%s', '%s');", timestamp, data);
sp->update(sql);

在MFC开发中,我添加了这部分连接数据库的代码以存储数据,运行就报错

Community Center | Not monitored
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.