Hi Brian,
Regenerating mysql_filtered.h indeed works on Fedora 11 but you will break
compilation on other platforms (like CentOS or RHEL 5) because these have
different mysql.h header files. It looks like there was quite a big change
in the mysql.h header file.
What actually should be done is (at compilation/packaging time) use the
original mysql.h file from the OS and generate the swig stuff with SWIG.
This of course adds a dependency to SWIG which is now not there because the
swig files are already generated.
Regards
Wim
On Thu, Jan 14, 2010 at 20:04, Brian Cunnie <[email protected]> wrote:
> Hello Esteemed Developers,
>
> I would like to contribute to the database package in octave-forge.
>
> My sf.net id is cunnie.
>
> I have attached a patch as requested (mysql_filtered.h).
>
> Summary:
> - Install mysql_filtered.h.
> - regenerate mysql_wrap.cpp by using "./configure --with-swig && touch
> src/mysql.i && make"
>
> Background:
> I had difficulty compiling the database package for my environment
> (Fedora 11 64-bit, mysql 5.1.41, octave 3.2.3). It would die with the
> error "mysql_wrap.cpp:1197: error: ‘curr_sym_tab’ was not declared in
> this scope". Re-generating mysql_wrap.cpp got me further, but I was
> still stopped by "mysql_wrap.cpp:7622: error: ‘gptr’ was not declared
> in this scope". I decided to regenerate mysql_filtered.h based on
> /usr/include/mysql/mysql.h.
>
> Bugs:
> The way to define a database connection doesn't seem to work the
> documented way. I am not sure why. I have found the following octave
> instructions work for me (where result1 & result2 are field names in
> the table 'test' in the 'testdb' database):
>
> db = mysql_db("localhost","root","secret","testdb");
> default_db(db);
> result1=sql('select result1 from test');
> result2=sql('select result2 from test');
> plot(cell2mat(result1),cell2mat(result2))
> mysql_get_server_info(db.db)
> mysql_info(db.db)
>
> --Brian
>
> p.s. thanks for the database package; it has made my job possible.
>
> --
> Brian Cunnie <[email protected]>
> cell: 650.968.6262
>
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev