Problem with compilation with MySQL

Moderator: Rathinagiri

Post Reply
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Problem with compilation with MySQL

Post 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?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problem with compilation with MySQL

Post 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
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Problem with compilation with MySQL

Post 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!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Problem with compilation with MySQL

Post by Rathinagiri »

I had found out problem!

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

Now it is working fine. Thanks Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problem with compilation with MySQL

Post 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...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problem with compilation with MySQL

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply