Re: [sqlite] My HPUX Notes

2007-05-10 Thread Essien Essien

guess you missed all the smileys and innuendo in that reply then.

On 5/8/07, Glenn <[EMAIL PROTECTED]> wrote:

Essien Essien wrote:
> that was really funny you know :)

And your response was really obnoxious.  You could have simply said that
the common way to do things on POSIX is "./configure; make; make
install;" which would accomplish the same thing and left it at that.
Rubbing someone's nose in their inexperience is extremely rude.

--
Glenn McAllister <[EMAIL PROTECTED]>  +1 416 348 1594
SOMA Networks, Inc.  http://www.somanetworks.com/  +1 416 977 1414

-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] My HPUX Notes

2007-05-08 Thread Essien Essien

that was really funny you know :)

On POSIX systems you're supposed to do three things to get your
software installed (usually a standard set of three commands).

1. ./configure (some packages leave this out, since they don't use GNU
autotools)
2. make (there's almost always this, or an alternative, CMAKE, Scons, ant, etc)
3. make install (if there's a Makefile, you'll be able to do a make
install, if the software is supposed to be used anyways... and all
replacements have equivalents - ant deploy for instance).

So please, please, please, your steps are all wrong... you're not
installing sqlite the way you're supposed to install from source on
POSIX systems, go back and do the steps..
and you know try to learn about building stuff from source (google
would seem to be a good referal source here :) )

PS:
I really had to reply to this, seeing as your steps are all wrong, and
this mail will be archived and someone else (2 yrs from now), may
_actually_ follow your steps (omg!!!) :P

Also, I'll take a one step long-suffering act (sigh), you can email me
offlist, for a _OneTime_ tutorial (if you really want to learn the
right way). After that, read this email again, and you'll see how
ridiculous it sounds.

peace bro,
Essien

On 5/7/07, km4hr <[EMAIL PROTECTED]> wrote:

Notes on how I got sqlite running on hpux 11.0

To install sqlite on hpux:
* download sqlite-3.3.17.tar.gz from web site.
  (I unzipped the file on linux using gunzip I think. Then copied
   the tar file to /opt on the unix box. I guess gunzip works on hpux also.)
* cd to /opt and untar the file. (tar xf sqlite-3.3.17.tar)
* cd to sqlite... dir created by tar.
* create a "bld" directory as recommended in sqlite README.
* cd to bld.
* Use GNU bash version of "make" (came with hpux 11.0 on my computer
/opt/OpenSource/...) to
  perform the build instructions given in sqlite README. The hpux version of
  make doesn't work. It chokes on the "+=" operators in the make file.
* after "making" sqlite, look in the "bld/.libs" directory for the sqlite
  library files. "sqlite3" command line program is there as well.
* no "sqlite.h" file is provided by the install (?) but "sqlite.h.in"
provided works.
* here's how I compiled the test program given on the sqlite web site:
  cd to my home directory.
  Copied contents of C test program on web site into file "myprog.c".
  Changed "#include " to "#include "/sqlite.h.in".
  Then: "cc -o myprog myprog.c /opt/sqlite/bld/.libs/libsqlite3.a"
* Used /opt/sqlite/bld/.libs/sqlite3 to create database "test.db" (create
table...)
  and to add some records in a table (insert into table ...).
* run myprog test program to dump the table.
  Ex: myprog test.db "select * from tablename"

  Works! Success!

* Now I need to figure out where to install the sqlite library and header
file permanently on hpux.


--
View this message in context: 
http://www.nabble.com/I%27m-Starving-for-New-User-Information-tf3701471.html#a10363806
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sqlite3 dll symbols

2006-04-04 Thread Essien Essien
thanks you all for the explanations. It was a small project for a friend and
nothing critical really. I'm no windows guru, and i'm not so sure i want to
be (what with all the hoops and noops) ;)

Now back to Linux defender of... oops that's Voltron :)

On 4/1/06, John Stanton < [EMAIL PROTECTED]> wrote:
>
> Dennis Jenkins wrote:
> > Essien Essien wrote:
> >
> >>hiya,
> >>
> >>I have a code snippet that looks like:
> >>
> >>typedef int (*SQLITE3_CLOSE)(sqlite3*);
> >>typedef const char* (*SQLITE3_ERRMSG)(sqlite3*);
> >>typedef int (*SQLITE3_OPEN)(const char*, sqlite3**);
> >>typedef int (*SQLITE3_EXEC) (sqlite3*, const char*, sqlite3_callback,
> void*,
> >>char**);
> >>
> >>HINSTANCE sqlite3_dll;
> >>
> >>SQLITE3_CLOSE _sqlite3_close;
> >>SQLITE3_ERRMSG _sqlite3_errmsg;
> >>SQLITE3_OPEN _sqlite3_open;
> >>SQLITE3_EXEC _sqlite3_exec;
> >>
> >>int DB_Init()
> >>{
> >>sqlite3_dll = LoadLibrary("sqlite3.dll");
> >>if (sqlite3_dll == NULL) {
> >> printf("Cannot find sqlite3.dll. Make sure its in the same
> >>directory as the program\n");
> >> return 0;
> >>}
> >>
> >>_sqlite3_open = (SQLITE3_OPEN)GetProcAddress(sqlite3_dll,
> >>"sqlite3_open");
> >>if (_sqlite3_open == NULL) {
> >>printf("Cannot load function sqlite3_open");
> >>return 0;
> >>}
> >>}
> >>
> >>problem is, when ever i call DB_Init(), it always fails with 'Cannot
> load
> >>function sqlite3_open'. But it successfully passes the LoadLibrary
> portion.
> >>I'm not a win32 guru, so i'm willing to admit i've made a mistake
> somewhere.
> >>
> >>Any ideas on what i'm doing wrong?
> >>
> >>I'm using Turbo C++ 4.5 IDE and related tools. (yeah... i know turbo
> >>C++ 4.5is realy aged, but could this be the problem?)
> >>
> >>Essien
> >>
> >>
> >
> >
> > Since you have the borland compiler product, use the "TDUMP.EXE" tool to
> > view the PE header of the sqlite3.dll file.  Sometimes the functions
> > will be exported with a leading underscore.  If your compiler is
> > producing 32 bit binaries, and the DLL is also 32 bit, then you might
> > try adding a leading underscore to the symbol name when you call
> > 'GetProcAddress'.
> >
> You could also try statically linking Sqlite and bypassing the DLL.
>


Re: [sqlite] Re: sqlite3 dll symbols

2006-03-31 Thread Essien Essien
On 3/31/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
>
> Essien Essien <[EMAIL PROTECTED]> wrote:
> > _sqlite3_open = (SQLITE3_OPEN)GetProcAddress(sqlite3_dll,
> > "sqlite3_open");
> > if (_sqlite3_open == NULL) {
> > printf("Cannot load function sqlite3_open");
> > return 0;
> > }
> > }
> >
> > I'm using Turbo C++ 4.5 IDE and related tools. (yeah... i know turbo
> > C++ 4.5is realy aged, but could this be the problem?)
>
> I believe Turbo C++ can only produce Win16 executables. A Win16
> executable can load a Win32 DLL but cannot call functions in it without
> jumping through extremely complicated hoops:
>
> http://msdn.microsoft.com/library/en-us/winprog/winprog/generic_thunks.asp
> http://msdn.microsoft.com/archive/en-us/win9x/tc_0cz6.asp
>
> I would not recommend this route except when somebody is holding a gun
> to your head. You'll make your life a lot easier by using a modern
> compiler capable of producing Win32 executables. Visual C++ Express
> Edition is one such compiler, available from your friendly operating
> system vendor at no charge:
>
> http://msdn.microsoft.com/vstudio/express/visualc/
>
> Igor Tandetnik
>
>
wow!

Thanks for the quick reply.

To put it more succinctly... i think i'm fscked, since i _have_ to do this
with Turbo C++/Borland C++. It's not a life-threatening project anyways, its
a little assignment/project for a friend. I guess i'm just going to have to
build a poor man's sruct-to-binary-file-database then.

Once again thnx. At least... it wasn't my flat out fault ;)

Essien


[sqlite] sqlite3 dll symbols

2006-03-31 Thread Essien Essien
hiya,

I have a code snippet that looks like:

typedef int (*SQLITE3_CLOSE)(sqlite3*);
typedef const char* (*SQLITE3_ERRMSG)(sqlite3*);
typedef int (*SQLITE3_OPEN)(const char*, sqlite3**);
typedef int (*SQLITE3_EXEC) (sqlite3*, const char*, sqlite3_callback, void*,
char**);

HINSTANCE sqlite3_dll;

SQLITE3_CLOSE _sqlite3_close;
SQLITE3_ERRMSG _sqlite3_errmsg;
SQLITE3_OPEN _sqlite3_open;
SQLITE3_EXEC _sqlite3_exec;

int DB_Init()
{
sqlite3_dll = LoadLibrary("sqlite3.dll");
if (sqlite3_dll == NULL) {
 printf("Cannot find sqlite3.dll. Make sure its in the same
directory as the program\n");
 return 0;
}

_sqlite3_open = (SQLITE3_OPEN)GetProcAddress(sqlite3_dll,
"sqlite3_open");
if (_sqlite3_open == NULL) {
printf("Cannot load function sqlite3_open");
return 0;
}
}

problem is, when ever i call DB_Init(), it always fails with 'Cannot load
function sqlite3_open'. But it successfully passes the LoadLibrary portion.
I'm not a win32 guru, so i'm willing to admit i've made a mistake somewhere.

Any ideas on what i'm doing wrong?

I'm using Turbo C++ 4.5 IDE and related tools. (yeah... i know turbo
C++ 4.5is realy aged, but could this be the problem?)

Essien