• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: how to cross compile with MySQL API?  (Read 1880 times)
thewall
Newbie
*

Karma: 0
Posts: 2


View Profile
« on: December 29, 2011, 01:53:05 PM »

yep, newbie her...

Need some guidance how to cross compile c code using MySql API for Plug.

I've installed MySql on the plug, works fine.

When I compile c code using MySql API for non-Plug systems ( ie x86) I compile with:

gcc bla.c -o bla 'mysql_config --cflags --libs'
and in the c file my_global.h and mysql.h are included

If I cross compile code for plug I use

arm-none-linux-gnueabi-gcc -o bla.cgi bla.c

I've tried several combination to include the mysql_config parms in the syntax for the cross-compiler but it seems that it stops with the error:

bla.c:1:23: error: my_global.h: No such file or directory
bla.c:2:19: error: mysql.h: No such file or directory


How to proceed?

Some guidance will be appreciated  :-)

thanks,__frank


Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #1 on: December 29, 2011, 08:59:27 PM »

It's simpler to do native compiles on the plug.  I do native compiles on my plug all of the time.

For serious cross-compile setups, scratchbox sounds like it works pretty well.  That's what's being used for some larger projects on CuBox.
Logged

thewall
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #2 on: December 31, 2011, 10:55:12 AM »

Weel,  thanks for the advise. I will install sb2 and try to work on that.

Still I think I miss some elementary setting, it should be doable to compile c code on the Plug using the Mysql libs...

have a good 2012,__Frank
Logged

Pages: [1]
Print
Jump to: