尝试在 Mac OS Sierra 中编译我的软件时,我遇到了关于未知编译指示的问题(请参阅下面的代码段)。据一位同事称,该软件可以在 Mac OS X Yosemite 中编译,使用相同的 clang 版本 (4.2.1)。使用的编译标志是:-std=c++11 -stdlib=libc++. 使用stdlibc++不是一个选项,因为它不包括std::shared_ptr.
error: unknown warning group '-Wmaybe-uninitialized', ignored
[-Werror,-Wunknown-pragmas]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
Run Code Online (Sandbox Code Playgroud)
这是打印出来的 g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Run Code Online (Sandbox Code Playgroud)
不确定从哪里开始,非常感谢任何输入。
我收到的错误是:
错误 1366 (HY000):DECIMAL 值不正确:第 -1 行的列 '' 为 '0'
我正在尝试normalize数据库并确保数据类型正确。将数据从 插入BASE_TABLE到名为 的新表中Inventors。
这是我用来插入的查询。如果我从查询中手动获取一行,select它可以正确插入到 Inventors 表中。
但是,像这样运行查询我立即收到上面的错误。
INSERT INTO
Inventors(ID,Firstname,Middlename,Lastname,Country,Latitude,Longitude)
SELECT DISTINCT
Inventor_ID as ID,
Firstname,
Middlename,
Lastname,
Country,
cast(Latitude as decimal(11,6)) as Latitude,
cast(Longitude as decimal(11,6)) as Longitude
FROM
BASE_TABLE
Run Code Online (Sandbox Code Playgroud)
这是无法在查询中插入的行select:
ID Firstname Middlename Lastname Country Latitude Longitude
04308666-3 RICHARD RICHARD JUNG 0.000000 0.000000
Run Code Online (Sandbox Code Playgroud)
Inventors创建查询:
CREATE TABLE `Inventors` (
`ID` varchar(55) NOT NULL DEFAULT '',
`Firstname` …Run Code Online (Sandbox Code Playgroud)