连接到SQLAPI时omnet程序出错

时间:2019-01-16 12:47:32

标签: c++ sql-server omnet++

我已经在omnet中编写了用于连接SQL Server的简单代码,但这给了我类似的错误

  

在C:/omnetpp-5.3/include/SQLAPI/include \ ss6API.h:12中包含的文件中:   C:/omnetpp-5.3/include/SQLAPI/include /./ ss_win / sqlfront.h:312:30:错误:使用不同类型重新定义了typedef('const LPBYTE'(aka'unsigned char * const')vs'const BYTE *'(aka'const unsigned char *'))   typedef const LPBYTE LPCBYTE;                                ^   C:\ omnetpp-5.3 \ tools \ win64 \ mingw64 \ x86_64-w64-mingw32 \ include \ winscard.h:23:23:注意:以前的定义在这里     typedef const字节* LPCBYTE;                         ^   产生1个错误。   make:* [Makefile:104:out / clang-release // DB.o]错误1 **

书面代码如下

SAConnection con;
    con.setOption( "UseAPI" ) = "DB-Library";
    con.setClient( SA_SQLServer_Client );
    try
    {

        con.Connect(
              "NADRA@paper2"
 "",     // database name
            "",   // user name
            SA_SQLServer_Client);

        printf("We are connected!\n");

        // Disconnect is optional
        // autodisconnect will ocur in destructor if needed
        con.Disconnect();

        printf("We are disconnected!\n");
    }

有人可以帮助您解决什么问题以及如何解决该错误。我正在使用OMnet IDE版本5.3和SQL Server Management Studio 13.0.16100.1

预先感谢

0 个答案:

没有答案