MySQL Forums
Forum List  »  Source, Builds, Binaries

VS2013, C++ and compilation errors
Posted by: Broly Bear
Date: March 14, 2017 06:20AM

Hello,

I am a student working on a project and I've having issues with the C++ connector. The pre-compiled build can input integers and strings into my database, but strings always become garbage when retrieving. I'm suspecting it's to do with the "MDd" runtime parameters of my projecting being incompatible with the pre-compiled MySQL build.

I'm trying to re-compile MySQL with my compiler for compatibility.

Visual Studio 2013
CMAKE 3.7.2
Connector/C++ 1.1.8 (source)
BOOST 1_63_00

When CMAKE is used: I get the following output on Generation. There are no issues when configuring.

Configuring bugs test cases - unsorted
Configuring unit tests - group template_bug
Configuring done
CMake Warning (dev) in driver/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Target "mysqlcppconn" has an INTERFACE_LINK_LIBRARIES property which
differs from its LINK_INTERFACE_LIBRARIES properties.

INTERFACE_LINK_LIBRARIES:

mysqlclient;ws2_32

LINK_INTERFACE_LIBRARIES:

This warning is for project developers. Use -Wno-dev to suppress it.

Generating done"

When building within Visual Studio 2013, I get "undefined type time-spec" and "left of ->tv_nsec must point to class type" errors.

13> c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(688) : see declaration of 'timespec'
13>c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(697): error C2227: left of '->tv_sec' must point to class/struct/union/generic type
13>c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(698): error C2027: use of undefined type 'timespec'
13> c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(688) : see declaration of 'timespec'
13>c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(698): error C2227: left of '->tv_nsec' must point to class/struct/union/generic type
13>c:\program files (x86)\mysql\mysql connector c 6.1\include\my_global.h(727): error C2027: use of undefined type 'timespec'

Could anyone please provide any insight to the issues I am having?

Options: ReplyQuote


Subject
Views
Written By
Posted
VS2013, C++ and compilation errors
416
March 14, 2017 06:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.