Hi all!
After 14 years using Perl for programming at job I'm now learning
D. (And enjoying it)
We've been using Perl (at job) for years for loading input data
(UTF files) into a database and using these data for different
purposes.
The volume of input data files has been constantly increasing
along the years and, eventually, we need a faster solution,
that's the reason to switch back to compiled languages, and D
seemed interesting enough to give it a try. :-)
As a newbie I've a few questions. I'm already using D and it's
working fine, although I'm writing baby-D the performance
improvement is impressive, I'm now trying to use mysql native
access. It seems there are two possibilities:
- https://github.com/simendsjo/mysqln
- https://github.com/rejectedsoftware/mysql-native
So far we've tried the second one, mysql-native, with success
while using rdmd, but I've failed to compile using dmd, (the
rather cryptic message from the compiler it's attached at the end
of this entry).
I'm using Ubuntu 13.10 64 bits. dmd v2.064, dub v0.9.20
I've cloned from github and then:
$ cd mysql-native
$ dub
$ cd ../myProyect
$ cp -r ../mysql-native/source/mysql .
$ dmd mpe_procTmpTables.d (fails)
$ ./mpe_procTmpTables.d (works fine via rdmd)
I know I must be doing something really stupid and wrong but I'm
stuck, any help would be really appreciated.
Thanks in advance.
Compiler error:
dmd mpe_procTmpTables.d
mpe_procTmpTables.o:(.data+0x550): undefined reference to
`_D5mysql10connection12__ModuleInfoZ'
mpe_procTmpTables.o: In function
`_D17mpe_procTmpTables10procTablesFAyaZv':
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x1e):
undefined reference to `_D5mysql10connection10Connection7__ClassZ'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x4a):
undefined reference to
`_D5mysql10connection10Connection6__ctorMFAyaE5mysql10connection11SvrCapFlagsZC5mysql10connection10Connection'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x69):
undefined reference to
`_D5mysql10connection8MetaData6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection8MetaData'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x99):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x415):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x5b9):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x5d3):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x5e6):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x650):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x663):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x67d):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x690):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x710):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x72a):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x73d):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x81c):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x82f):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x849):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x85c):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x93b):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x94e):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x968):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x97b):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0x9fb):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xa65):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xa78):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xae2):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xaf5):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xb0f):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xb22):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xc01):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xc14):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xc2e):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xc41):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xcc1):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xcdb):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xcee):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xd6e):
undefined reference to
`_D5mysql10connection7Command6__ctorMFNcC5mysql10connection10ConnectionZS5mysql10connection7Command'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xe4d):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xe60):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xe7a):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv+0xe8d):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.o: In function
`_D17mpe_procTmpTables10procTablesFAyaZv8colNamesMFAyaZAAya':
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv8colNamesMFAyaZAAya+0x52):
undefined reference to
`_D5mysql10connection8MetaData7columnsMFAyaZAS5mysql10connection10ColumnInfo'
mpe_procTmpTables.o: In function
`_D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi':
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x12f):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x209):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x22e):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x2de):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x2f1):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x32b):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x33e):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x42f):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x442):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x49b):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody3MFKAyaKAyaZi+0x4ae):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.o: In function
`_D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi':
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0xef):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x10d):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x1ab):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x1be):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x2bf):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x2d2):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x33b):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x34e):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x3a6):
undefined reference to
`_D5mysql10connection7Command3sqlMFNdAyaZAya'
mpe_procTmpTables.d:(.text._D17mpe_procTmpTables10procTablesFAyaZv14__foreachbody4MFKAyaKAyaZi+0x3b9):
undefined reference to
`_D5mysql10connection7Command7execSQLMFJmZb'
collect2: error: ld returned 1 exit status
--- errorlevel 1