Bug #2817 Error "unresolved external symbol _my_strtod" during compilation
Submitted: 16 Feb 2004 0:43 Modified: 23 Mar 2004 10:51
Reporter: Andrey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.1.2a (source tree) OS:Windows (WinXP)
Assigned to: Greg Weir CPU Architecture:Any

[16 Feb 2004 0:43] Andrey
Description:
Linking...
mysqlclient.lib(ctype-simple.obj) : error LNK2001: unresolved external symbol _my_strtod
mysqlclient.lib(ctype-ucs2.obj) : error LNK2001: unresolved external symbol _my_strtod
../client_debug/mysql.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

As far as i see, there are some changes in "m_string.h" - added declaration of my_strtod().

And changes in ctype-simple(ucs2).c - replacing of "strtod" to "my_strtod".

May be I should just add some lines in DEF file? But I don't know, which file I should edit .. :(

How to repeat:
[16 Feb 2004 1:20] Andrey
I've just get more errors:
opt_ft.h(27) : error C2011: 'FT_SELECT' : 'class' type redefinition
pt_ft.cpp(33) : error C2664: '__thiscall FT_SELECT::FT_SELECT(class THD *,struct st_table *,unsigned int)' : cannot convert parameter 3 from 'struct st_table_ref *' to 'unsigned int'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast
opt_range.cpp(2559) : error C2664: '__thiscall QUICK_RANGE::QUICK_RANGE(const char *,unsigned int,const char *,unsigned int,unsigned int)' : cannot convert parameter 1 from 'unsigned char *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

and more about prev comment:
I searched for definition of my_strtod. And I din't find it.
[16 Feb 2004 4:39] Sergei Golubchik
You're on a bleeding edge :)
I pushed my_strtod yesterday only.

Yes, I suspected that making it to work on Windows would require additional changes, but I couldn't do it myself (no Windows...). Today our Windows developer will fix this problem.

as for "I searched for definition of my_strtod. And I din't find it" - it should be in strings/strtod.c. Do you see it there ? (or it's a problem with linux->windows export script?)

http://mysql.bkbits.net:8080/mysql-4.1/hist/strings/strtod.c?nav=index.html|src/|src/strin...
[16 Feb 2004 6:52] MySQL Verification Team
For to resolve the external symbol issue on Windows just is necessary
to add the file \strings\strtod.c to the below VC++ project files:

\libmysql\libmysql.dsp
\client\mysqlclient.dsp

I am assign Greg whom is the VC++ project files maintainer.

Thanks for the bug report.
[18 Feb 2004 3:24] Andrey
It's still me again.
There are more errors. I hope it helps.

E:\src\mysql-4.1.2-alpha\sql\log_event.cpp(2641) : error C2664: '_my_memdup' : cannot convert parameter 1 from 'const char *' to 'const unsigned char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
fatal error C1083: Cannot open source file: 'E:\src\mysql-4.1.2-alpha\sql\opt_ft.cpp': No such file or directory

E:\src\mysql-4.1.2-alpha\sql\opt_range.cpp(2565) : error C2664: '__thiscall QUICK_RANGE::QUICK_RANGE(const char *,unsigned int,const char *,unsigned int,unsigned int)' : cannot convert parameter 1 from 'unsigned char *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\src\mysql-4.1.2-alpha\sql\opt_range.cpp(2565) : error C2664: '__thiscall QUICK_RANGE::QUICK_RANGE(const char *,unsigned int,const char *,unsigned int,unsigned int)' : cannot convert parameter 3 from 'unsigned char *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

E:\src\mysql-4.1.2-alpha\sql\set_var.cpp(863) : error C2664: 'ft_boolean_check_syntax_string' : cannot convert parameter 1 from 'const char *' to 'const unsigned char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\src\mysql-4.1.2-alpha\sql\mysqld.cpp(5618) : error C2664: 'ft_boolean_check_syntax_string' : cannot convert parameter 1 from 'char *' to 'const unsigned char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

gstream.obj : error LNK2001: unresolved external symbol _my_strtod
item_func.obj : error LNK2001: unresolved external symbol _my_atof
item_sum.obj : error LNK2001: unresolved external symbol _my_atof
sql_analyse.obj : error LNK2001: unresolved external symbol _my_atof
sql_yacc.obj : error LNK2001: unresolved external symbol _my_atof
strings.lib(ctype-tis620.obj) : error LNK2001: unresolved external symbol _strnlen
[23 Mar 2004 10:51] Greg Weir
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html