[squeak-dev] Problem with cdelc and apicall

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Problem with cdelc and apicall

Mariano Martinez Peck
People: I am having a problem with cdelc and apicall in windows with SqueakDBX.

I have a abstract class OpenDBX with the subclasses:  OpenDBXWin32 and OpenDBXUnix. SqueakDBX detects which OS you are using and instances one of them. They have these methods:

OpenDBXWin32:

apiBind: handle database: databaseName name: userName password: password method: method
    "int odbx_bind(odbx_t* handle, const char* database, const char* who, const char* cred,int method )"
    <apicall: long 'odbx_bind' (ulong char* char* char* ulong) module: 'libopendbx-1.dll'>
    ^self externalCallFailed

OpenDBXUnix:

apiBind: handle database: databaseName name: userName password: password method: method
    "int odbx_bind(odbx_t* handle, const char* database, const char* who, const char* cred,int method )"


In linux, I don't have problems, but in windows, when I try to download it from MC, I have a "sintax errror"

"OpenDBXUnix api calls apiBind: handle database: databaseName name: userName password: password method: method"

apiBind: handle database: databaseName name: userName password: password method: method
    "int odbx_bind(odbx_t* handle, const char* database, const char* who, const char* cred,int method )"
    <> expected ->cdecl: long 'odbx_bind' (ulong char* char* char* ulong) module: 'opendbx'>
    ^self externalCallFailed
    <cdecl: long 'odbx_bind' (ulong char* char* char* ulong) module: 'opendbx'>
    ^self externalCallFailed

Does anyone have an idea of what can be happening ?

thanks in advance.

Mariano




Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Problem with cdelc and apicall

Markus Fritsche
Mariano Martinez Peck <[hidden email]> wrote:

> People: I am having a problem with cdelc and apicall in windows with
> SqueakDBX.

Looks like you don't have FFI installed.

Also, SqueakDBX does not come with the DLLs, you will have to build them
yourself. I have prebuilt DLLs for Windows XP 32 Bit (only SQLite3 as
backend) (they only work on Windows XP, on Vista they don't - no idea why
yet).

Best regards,
        Markus


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problem with cdelc and apicall

Mariano Martinez Peck


On Sat, Mar 21, 2009 at 7:22 PM, Markus Fritsche <[hidden email]> wrote:
Mariano Martinez Peck <[hidden email]> wrote:

> People: I am having a problem with cdelc and apicall in windows with
> SqueakDBX.

Looks like you don't have FFI installed.

I feel like a stupid. I am one of the SqueakDBX author :)    But now I remember I think you are right. This was in my computer at work (new work) with a clean image and forgot to download FFI. So on Monday I will check this.
I will add this to the wiki.


Also, SqueakDBX does not come with the DLLs, you will have to build them
yourself. I have prebuilt DLLs for Windows XP 32 Bit (only SQLite3 as
backend) (they only work on Windows XP, on Vista they don't - no idea why
yet).


This is a very good notice for us. Actually, you can compile openDBX by yourself or by binaries. Last week I update the wiki and I explained that here:
http://wiki.squeak.org/squeak/6129

We are very near (few weeks) to release the stable version of squeakDBX using openDBX 1.4. In openDBX web page there are .deb for all backends, and I also did it for postgresql, odbc and mssql. Then, this dll will be also added in openDBX web page.

I couldn't compile sqlite3 on mingw in xp. I could do configure, make and make install, but the dll was no generated.

Could you tell me how yo do all this ? I would be very helpful for me as I am putting all the information on the wiki.

On the other hand, I would also like to do a SAR that automatically does everything, but I have no idea how to do it. If someone want help, this is appreciated.

Just of the record, are you using it just to test it or you want to use it for a real purpose ?

Greetings,

Mariano
 

Best regards,
       Markus





Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problem with cdelc and apicall

Mariano Martinez Peck
When I said "and I also did it for postgresql, odbc and mssql. Then, this dll will be also added in openDBX web page. " I mean dlls, in Windows :)

On Sat, Mar 21, 2009 at 7:31 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Sat, Mar 21, 2009 at 7:22 PM, Markus Fritsche <[hidden email]> wrote:
Mariano Martinez Peck <[hidden email]> wrote:

> People: I am having a problem with cdelc and apicall in windows with
> SqueakDBX.

Looks like you don't have FFI installed.

I feel like a stupid. I am one of the SqueakDBX author :)    But now I remember I think you are right. This was in my computer at work (new work) with a clean image and forgot to download FFI. So on Monday I will check this.
I will add this to the wiki.


Also, SqueakDBX does not come with the DLLs, you will have to build them
yourself. I have prebuilt DLLs for Windows XP 32 Bit (only SQLite3 as
backend) (they only work on Windows XP, on Vista they don't - no idea why
yet).


This is a very good notice for us. Actually, you can compile openDBX by yourself or by binaries. Last week I update the wiki and I explained that here:
http://wiki.squeak.org/squeak/6129

We are very near (few weeks) to release the stable version of squeakDBX using openDBX 1.4. In openDBX web page there are .deb for all backends, and I also did it for postgresql, odbc and mssql. Then, this dll will be also added in openDBX web page.

I couldn't compile sqlite3 on mingw in xp. I could do configure, make and make install, but the dll was no generated.

Could you tell me how yo do all this ? I would be very helpful for me as I am putting all the information on the wiki.

On the other hand, I would also like to do a SAR that automatically does everything, but I have no idea how to do it. If someone want help, this is appreciated.

Just of the record, are you using it just to test it or you want to use it for a real purpose ?

Greetings,

Mariano
 

Best regards,
       Markus






Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Problem with cdelc and apicall

Markus Fritsche
In reply to this post by Mariano Martinez Peck
Mariano Martinez Peck <[hidden email]> wrote:

>> Looks like you don't have FFI installed.

> I feel like a stupid. I am one of the SqueakDBX author :)

Hehe... Hit shappens ;-)

> This is a very good notice for us. Actually, you can compile openDBX by
> yourself or by binaries. Last week I update the wiki and I explained that
> here:
> http://wiki.squeak.org/squeak/6129

Hmm, put in my todo. I had to tweak the makefiles a bit on windows, since
"xyz.so" was hardcoded and so "xyz.dll" was not recognized to be built by
the OpenDBX-build chain.

Also, on make install, the DLLs are not copied correctly, but you can pick
them from the lib/.libs/ dir. I supposed that should be discussed on the
OpenDBX mail list.

> We are very near (few weeks) to release the stable version of squeakDBX
> using openDBX 1.4. In openDBX web page there are .deb for all backends, and
> I also did it for postgresql, odbc and mssql. Then, this dll will be also
> added in openDBX web page.

I uploaded the sqlite3 dll to http://reauktion.de/flugphase/2009/03/19/ 

> I couldn't compile sqlite3 on mingw in xp. I could do configure, make and
> make install, but the dll was no generated.

I think you have to 1. explicitly invoke "./configure --enable-shared" and
then the DLLs could be found in sqlite-3.6.11/.libs/

> Could you tell me how yo do all this ? I would be very helpful for me as I
> am putting all the information on the wiki.

I used sqlite-amalgamation-3.6.11.tar.gz as a starting point and the (a bit
outdated) mingw/msys build environment.

> On the other hand, I would also like to do a SAR that automatically does
> everything, but I have no idea how to do it. If someone want help, this is
> appreciated.

As a starting point you might take a look at the OS-Process SAR package, I
think it comes with everything (plugin, etc) needed.

> Just of the record, are you using it just to test it or you want to use it
> for a real purpose ?

Testing, since I saw that the old sqlite3 interface doesn't work anymore.

I plan to build my super-cool sea-side every 12 weeks... but then I'm having
more fun to just build a toolchain to *not* use it thereafter :D

Best regards,
       Markus


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problem with cdelc and apicall

Mariano Martinez Peck
Thanks for the testing and help. I put some things in the wiki and I forward this email to openDBX mailing list.

I will try to make this work here in my pc.

Thanks again.

Mariano

On Sat, Mar 21, 2009 at 8:32 PM, Markus Fritsche <[hidden email]> wrote:
Mariano Martinez Peck <[hidden email]> wrote:

>> Looks like you don't have FFI installed.

> I feel like a stupid. I am one of the SqueakDBX author :)

Hehe... Hit shappens ;-)

> This is a very good notice for us. Actually, you can compile openDBX by
> yourself or by binaries. Last week I update the wiki and I explained that
> here:
> http://wiki.squeak.org/squeak/6129

Hmm, put in my todo. I had to tweak the makefiles a bit on windows, since
"xyz.so" was hardcoded and so "xyz.dll" was not recognized to be built by
the OpenDBX-build chain.

Also, on make install, the DLLs are not copied correctly, but you can pick
them from the lib/.libs/ dir. I supposed that should be discussed on the
OpenDBX mail list.

> We are very near (few weeks) to release the stable version of squeakDBX
> using openDBX 1.4. In openDBX web page there are .deb for all backends, and
> I also did it for postgresql, odbc and mssql. Then, this dll will be also
> added in openDBX web page.

I uploaded the sqlite3 dll to http://reauktion.de/flugphase/2009/03/19/

> I couldn't compile sqlite3 on mingw in xp. I could do configure, make and
> make install, but the dll was no generated.

I think you have to 1. explicitly invoke "./configure --enable-shared" and
then the DLLs could be found in sqlite-3.6.11/.libs/

> Could you tell me how yo do all this ? I would be very helpful for me as I
> am putting all the information on the wiki.

I used sqlite-amalgamation-3.6.11.tar.gz as a starting point and the (a bit
outdated) mingw/msys build environment.

> On the other hand, I would also like to do a SAR that automatically does
> everything, but I have no idea how to do it. If someone want help, this is
> appreciated.

As a starting point you might take a look at the OS-Process SAR package, I
think it comes with everything (plugin, etc) needed.

> Just of the record, are you using it just to test it or you want to use it
> for a real purpose ?

Testing, since I saw that the old sqlite3 interface doesn't work anymore.

I plan to build my super-cool sea-side every 12 weeks... but then I'm having
more fun to just build a toolchain to *not* use it thereafter :D

Best regards,
      Markus





Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problem with cdelc and apicall

Mariano Martinez Peck
In reply to this post by Markus Fritsche



> This is a very good notice for us. Actually, you can compile openDBX by
> yourself or by binaries. Last week I update the wiki and I explained that
> here:
> http://wiki.squeak.org/squeak/6129

Hmm, put in my todo. I had to tweak the makefiles a bit on windows, since
"xyz.so" was hardcoded and so "xyz.dll" was not recognized to be built by
the OpenDBX-build chain.

Also, on make install, the DLLs are not copied correctly, but you can pick
them from the lib/.libs/ dir. I supposed that should be discussed on the
OpenDBX mail list.



Sorry to bother you again but we found a bug  (but now it is already fixed) in openDBX with sqlite3 in windows. Could you please tell me with which Windows (2000, xp, vista) you could make it work ?

Thanks!

Mariano
 



Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Problem with cdelc and apicall

Markus Fritsche
Mariano Martinez Peck <[hidden email]> wrote:

> Sorry to bother you again but we found a bug  (but now it is already fixed)
> in openDBX with sqlite3 in windows. Could you please tell me with which
> Windows (2000, xp, vista) you could make it work ?

I could test Windows XP and Windows Vista. Well, it didn't work in Windows
Vista back then.

Regards,
       Markus


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Problem with cdelc and apicall

Mariano Martinez Peck


On Wed, May 13, 2009 at 5:38 PM, Markus Fritsche <[hidden email]> wrote:
Mariano Martinez Peck <[hidden email]> wrote:

> Sorry to bother you again but we found a bug  (but now it is already fixed)
> in openDBX with sqlite3 in windows. Could you please tell me with which
> Windows (2000, xp, vista) you could make it work ?

I could test Windows XP and Windows Vista. Well, it didn't work in Windows
Vista back then.

mmmmm strange (I thought you did it with 2000). Anyway, now SqueakDBX works with Sqlite3 in Windows pretty easy. (compiling or just using the dlls).

Thanks!

Mariano
 

Regards,
      Markus