我正在使用FreeTDS庫來將C++連接到MSSQL,並且在編譯時出現以下錯誤。使用FreeTDS庫時出現衝突聲明'typedef int RETCODE'
In file included from pa_main.cpp:16:0: /usr/local/include/sybdb.h:120:13: error: conflicting declaration ‘typedef int RETCODE’ typedef int RETCODE;
In file included from /usr/include/sql.h:19:0, from pa_sql_db.h:16, from pa_main.cpp:11: /usr/include/sqltypes.h:268:33: note: previous declaration as ‘typedef short int RETCODE’ typedef signed short RETCODE;
我明白的是,使用相同的名稱定義爲RETCODE不同大小的INT了unixODBC和freetds的庫。
我該如何避免這種情況?任何人都可以請爲這個問題建議一個解決方法?
呃,聽起來像沒有命名空間衝突。祝你好運! –