Discussion:
[soci-users] SOCI_POSTGRESQL_DECL macro not included in class declarations
Erasmo Aguilera
2016-10-13 16:55:16 UTC
Permalink
Hi guys,

I recently tried to use the postgresql_soci_error::sqlstate() function in my code, but I got unresolved external symbol errors. I checked the code and noticed that the class didn't have the SOCI_POSTGRESQL_DECL macro in its declaration, which is why it wasn't exported in the DLL. I checked for other backends like Oracle, and the class had it..

I don't know which other classes would need to have the macro, but I just wanted you to know about this issue to take it into account for future releases.

Thanks for your efforts. SOCI is a great library.

Erasmo.
Mateusz Loskot
2016-10-14 08:12:26 UTC
Permalink
Post by Erasmo Aguilera
Hi guys,
I recently tried to use the postgresql_soci_error::sqlstate() function in my
code, but I got unresolved external symbol errors. I checked the code and
noticed that the class didn’t have the SOCI_POSTGRESQL_DECL macro in its
declaration, which is why it wasn’t exported in the DLL. I checked for other
backends like Oracle, and the class had it..
This looks like an overlook.
Similar _DECL is missing from mysql_soci_error class definition.

I'll try to fix it in the master branch soon.

Thanks for the report.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Mateusz Loskot
2016-10-14 08:36:43 UTC
Permalink
Post by Mateusz Loskot
Post by Erasmo Aguilera
Hi guys,
I recently tried to use the postgresql_soci_error::sqlstate() function in my
code, but I got unresolved external symbol errors. I checked the code and
noticed that the class didn’t have the SOCI_POSTGRESQL_DECL macro in its
declaration, which is why it wasn’t exported in the DLL. I checked for other
backends like Oracle, and the class had it..
This looks like an overlook.
Similar _DECL is missing from mysql_soci_error class definition.
I'll try to fix it in the master branch soon.
https://github.com/SOCI/soci/pull/510

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Loading...