Page 1 of 1

Problem with compilation with MySQL

Posted: Wed Dec 09, 2009 7:36 am
by Rathinagiri
I had made a fresh installation of HMG 3.0 Test XII and IDE 3.0 Test XIIe.

I opened c:\hmg\samples\mysql.3\demo.hbp using IDE and I had got the following errors! :(

Code: Select all

hbmk2: Processing: demo.hbc                                                    
hbmk2: Linking... demo.exe                                                     
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x3f): undefined reference to `mysql_escape_string@12'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0xba): undefined reference to `mysql_get_server_info@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0xe2): undefined reference to `mysql_get_host_info@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x10a): undefined reference to `mysql_affected_rows@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x166): undefined reference to `mysql_num_rows@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x1ca): undefined reference to `mysql_list_tables@8'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x1d7): undefined reference to `mysql_num_rows@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x1f8): undefined reference to `mysql_fetch_row@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x236): undefined reference to `mysql_free_result@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x27d): undefined reference to `mysql_list_dbs@8'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x28a): undefined reference to `mysql_num_rows@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x2ac): undefined reference to `mysql_fetch_row@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x2ea): undefined reference to `mysql_free_result@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x326): undefined reference to `mysql_error@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x369): undefined reference to `mysql_list_fields@12'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x396): undefined reference to `mysql_field_count@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x3be): undefined reference to `mysql_num_fields@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x3eb): undefined reference to `mysql_num_fields@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x401): undefined reference to `mysql_fetch_row@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x49d): undefined reference to `mysql_field_seek@8'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x4c6): undefined reference to `mysql_free_result@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x4fb): undefined reference to `mysql_fetch_field@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x6dd): undefined reference to `mysql_data_seek@12'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x706): undefined reference to `mysql_use_result@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x72e): undefined reference to `mysql_store_result@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x769): undefined reference to `mysql_query@8'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x7a9): undefined reference to `mysql_select_db@8'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x7d6): undefined reference to `mysql_rollback@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x7fe): undefined reference to `mysql_commit@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x826): undefined reference to `mysql_close@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x8c2): undefined reference to `mysql_init@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x8fe): undefined reference to `mysql_real_connect@32'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x94c): undefined reference to `mysql_close@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0x97e): undefined reference to `mysql_get_server_version@4'
C:/hmg/harbour/lib/libhbmysql.a(c_mysql.o):c_mysql.c:(.text+0xab0): undefined reference to `mysql_escape_string@12'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1                                                
gcc.exe .hbmk\win\mingw\demo.o .hbmk\win\mingw\_hbmkaut.o _temp.o    -mwindows -Wl,--start-group -lminigui -lhbmysql -lmysql -lcrypt -ledit -leditex -lgraph -lini -lreport -lhbwin -lhbziparc -lhbmzip -lmsvfw32 -lvfw32 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbvpdf -lhbmemio -lhbsqlit3 -lsqlite3 -lhbfimage -lhbpgsql -lpq -lhbtip -lhbct -lhbmisc -lhbnetio -lxhb -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib  -Wl,--end-group -odemo.exe -LC:/hmg/harbour/lib -LC:/hmg//lib -LC:/hmg/SAMPLES/MYSQL.3/
What could be the reason?

Re: Problem with compilation with MySQL

Posted: Wed Dec 09, 2009 12:30 pm
by Roberto Lopez
rathinagiri wrote:I had made a fresh installation of HMG 3.0 Test XII and IDE 3.0 Test XIIe.
I've tested and it is working fine here.

Such error arises when libmysql import library is not correct.

'\hmg\lib\LibMySql.a' -> 112622 bytes - 04/01/09 - 23:14

Re: Problem with compilation with MySQL

Posted: Wed Dec 09, 2009 2:44 pm
by Rathinagiri
Roberto Lopez wrote:
rathinagiri wrote:I had made a fresh installation of HMG 3.0 Test XII and IDE 3.0 Test XIIe.
I've tested and it is working fine here.

Such error arises when libmysql import library is not correct.

'\hmg\lib\LibMySql.a' -> 112622 bytes - 04/01/09 - 23:14
Mine is also exactly the same - '\hmg\lib\LibMySql.a' -> 112622 bytes - 04/01/09 - 23:14

But doesn't work. :(

I had tested in two systems one is Windows XP and another is Vista!

Re: Problem with compilation with MySQL

Posted: Wed Dec 09, 2009 3:07 pm
by Rathinagiri
I had found out problem!

c:\hmg\harbour\lib had some old libmysql.a :)

Now it is working fine. Thanks Roberto.

Re: Problem with compilation with MySQL

Posted: Thu Dec 10, 2009 2:15 am
by Roberto Lopez
rathinagiri wrote:
Mine is also exactly the same - '\hmg\lib\LibMySql.a' -> 112622 bytes - 04/01/09 - 23:14

But doesn't work. :(

I had tested in two systems one is Windows XP and another is Vista!
I've tested in my main system (Win7).

I'll still trying...

Re: Problem with compilation with MySQL

Posted: Thu Dec 10, 2009 2:27 am
by Roberto Lopez
rathinagiri wrote:I had found out problem!

c:\hmg\harbour\lib had some old libmysql.a :)

Now it is working fine. Thanks Roberto.
Ok.