I have no experience with Mac OS X but under Linux you have to install an odbc package. If I remember the right things you to put an symolic link called 'odbc32' in the directory where squeak is living. After this you might be able to connect to your database.
Only some hints from another OS. HTH Cheers Frank Send from Blackberry --- Edelstahlwerke Schmees GmbH Geschäftsleitung Clemens Schmees Sitz D-01796 Pirna Handelsregister Dresden HRB 54 www.schmees.com -----Original Message----- From: [hidden email] Date: Tue, 16 Oct 2007 19:17:10 To:[hidden email], [hidden email] Subject: Re: ODBC and Mac OS X Yes, FFI is installed (FFI was installed by ODBC dependency in Universe Browser). Do you have working ODBC enviroment in Squeak on Mac OS X? (I am using squeak-dev image sq3.9-7067dev07.10.1.image) pf On 16.10.2007, at 19:09, Ramon Leon wrote: >> Hi, is possible to use ODBC in Squeak under Mac OS X? >> >> My test code: >> connection := ODBCConnection >> dsn: 'TESTDSN' >> user: '***' >> password: '***'. >> >> Error: Unable to find function address. >> >> In class method ODBCLibrary>>moduleName is "odbc32" - is it >> platform independent? No one using ODBC on Mac OS X? >> >> Thanks, pf > > ODBC requires FFI, do you have FFI installed? > > Ramon Leon > http://onsmalltalk.com > > > |
Thanks for tip Frank!
Solution: cd /usr/lib ln -sf libiodbc.2.dylib odbc32 On 16.10.2007, at 19:27, Frank Urbach wrote: > I have no experience with Mac OS X but under Linux you have to > install an odbc package. If I remember the right things you to put > an symolic link called 'odbc32' in the directory where squeak is > living. After this you might be able to connect to your database. > Only some hints from another OS. > > HTH > > Cheers > Frank > > Send from Blackberry > --- > Edelstahlwerke Schmees GmbH > Geschäftsleitung Clemens Schmees > Sitz D-01796 Pirna > Handelsregister Dresden HRB 54 > www.schmees.com > > > -----Original Message----- > From: [hidden email] > Date: Tue, 16 Oct 2007 19:17:10 > To:[hidden email], [hidden email] > Subject: Re: ODBC and Mac OS X > > Yes, FFI is installed (FFI was installed by ODBC dependency in > Universe Browser). Do you have working ODBC enviroment in Squeak on > Mac OS X? > (I am using squeak-dev image sq3.9-7067dev07.10.1.image) > > pf > > On 16.10.2007, at 19:09, Ramon Leon wrote: > >>> Hi, is possible to use ODBC in Squeak under Mac OS X? >>> >>> My test code: >>> connection := ODBCConnection >>> dsn: 'TESTDSN' >>> user: '***' >>> password: '***'. >>> >>> Error: Unable to find function address. >>> >>> In class method ODBCLibrary>>moduleName is "odbc32" - is it >>> platform independent? No one using ODBC on Mac OS X? >>> >>> Thanks, pf >> >> ODBC requires FFI, do you have FFI installed? >> >> Ramon Leon >> http://onsmalltalk.com >> >> >> > > > > > smime.p7s (3K) Download Attachment |
Then works on your mac?
El 16/10/2007, a las 20:24, Petr Fischer escribió: > Thanks for tip Frank! > > Solution: > cd /usr/lib > ln -sf libiodbc.2.dylib odbc32 > > On 16.10.2007, at 19:27, Frank Urbach wrote: > >> I have no experience with Mac OS X but under Linux you have to >> install an odbc package. If I remember the right things you to put >> an symolic link called 'odbc32' in the directory where squeak is >> living. After this you might be able to connect to your database. >> Only some hints from another OS. >> >> HTH >> >> Cheers >> Frank >> >> Send from Blackberry >> --- >> Edelstahlwerke Schmees GmbH >> Geschäftsleitung Clemens Schmees >> Sitz D-01796 Pirna >> Handelsregister Dresden HRB 54 >> www.schmees.com >> >> >> -----Original Message----- >> From: [hidden email] >> Date: Tue, 16 Oct 2007 19:17:10 >> To:[hidden email], [hidden email] >> Subject: Re: ODBC and Mac OS X >> >> Yes, FFI is installed (FFI was installed by ODBC dependency in >> Universe Browser). Do you have working ODBC enviroment in Squeak on >> Mac OS X? >> (I am using squeak-dev image sq3.9-7067dev07.10.1.image) >> >> pf >> >> On 16.10.2007, at 19:09, Ramon Leon wrote: >> >>>> Hi, is possible to use ODBC in Squeak under Mac OS X? >>>> >>>> My test code: >>>> connection := ODBCConnection >>>> dsn: 'TESTDSN' >>>> user: '***' >>>> password: '***'. >>>> >>>> Error: Unable to find function address. >>>> >>>> In class method ODBCLibrary>>moduleName is "odbc32" - is it >>>> platform independent? No one using ODBC on Mac OS X? >>>> >>>> Thanks, pf >>> >>> ODBC requires FFI, do you have FFI installed? >>> >>> Ramon Leon >>> http://onsmalltalk.com >>> >>> >>> >> >> >> >> >> > > |
Yes. It works... and reads data from Firebird SQL.
On 16.10.2007, at 20:27, Giuseppe Luigi Punzi Ruiz wrote: > Then works on your mac? > > El 16/10/2007, a las 20:24, Petr Fischer escribió: > >> Thanks for tip Frank! >> >> Solution: >> cd /usr/lib >> ln -sf libiodbc.2.dylib odbc32 >> >> On 16.10.2007, at 19:27, Frank Urbach wrote: >> >>> I have no experience with Mac OS X but under Linux you have to >>> install an odbc package. If I remember the right things you to >>> put an symolic link called 'odbc32' in the directory where squeak >>> is living. After this you might be able to connect to your database. >>> Only some hints from another OS. >>> >>> HTH >>> >>> Cheers >>> Frank >>> >>> Send from Blackberry >>> --- >>> Edelstahlwerke Schmees GmbH >>> Geschäftsleitung Clemens Schmees >>> Sitz D-01796 Pirna >>> Handelsregister Dresden HRB 54 >>> www.schmees.com >>> >>> >>> -----Original Message----- >>> From: [hidden email] >>> Date: Tue, 16 Oct 2007 19:17:10 >>> To:[hidden email], [hidden email] >>> Subject: Re: ODBC and Mac OS X >>> >>> Yes, FFI is installed (FFI was installed by ODBC dependency in >>> Universe Browser). Do you have working ODBC enviroment in Squeak on >>> Mac OS X? >>> (I am using squeak-dev image sq3.9-7067dev07.10.1.image) >>> >>> pf >>> >>> On 16.10.2007, at 19:09, Ramon Leon wrote: >>> >>>>> Hi, is possible to use ODBC in Squeak under Mac OS X? >>>>> >>>>> My test code: >>>>> connection := ODBCConnection >>>>> dsn: 'TESTDSN' >>>>> user: '***' >>>>> password: '***'. >>>>> >>>>> Error: Unable to find function address. >>>>> >>>>> In class method ODBCLibrary>>moduleName is "odbc32" - is it >>>>> platform independent? No one using ODBC on Mac OS X? >>>>> >>>>> Thanks, pf >>>> >>>> ODBC requires FFI, do you have FFI installed? >>>> >>>> Ramon Leon >>>> http://onsmalltalk.com >>>> >>>> >>>> >>> >>> >>> >>> >>> >> >> > > > smime.p7s (3K) Download Attachment |
We have lots of FFI in Sophie.
The key to it is (a) being able to find the module that is in the FFI call. Or a derived name which is based on the module name. (b) being able to find the module in some path that the Squeak VM will search in. For the os-x carbon VM See SqueakPluginsBuiltInOrLocalOnly http://www.smalltalkconsulting.com/html/squeakinfoplist.html Once the module is found we find the procedure name, again based on the information in the Smalltalk method. So for the example below we expect to find NavCreateNewFolderDialog in Carbon.framework which is in /System/Library/Frameworks a place where we look automatically for frameworks. Of course the input parms and return value must match expectations, otherwise you crash the VM, or get an error coecering variables between Smalltalk objects and C types. apiNavCreateNewFolderDialog: aMacNavDialogCreationOptions eventProc: aEventProc client: data dialogRef: aNavDialogRef <cdecl: long 'NavCreateNewFolderDialog' ( MacNavDialogCreationOptions* long long MacNavDialogRef*) module:'Carbon.framework'> ^ self externalCallFailed "OSStatus NavCreateNewFolderDialog ( const NavDialogCreationOptions * inOptions, NavEventUPP inEventProc, void * inClientData, NavDialogRef * outDialog );" The usual problems you run into is finding and loading the module. The os-x carbon VM has a SqueakDebug info.plist value you can set to 1 to help debug this issue. After finding the module the next issue likely is coding a proper parm list and then giving it the correct objects. save image often, cross fingers... On Oct 16, 2007, at 12:20 PM, Petr Fischer wrote: > Yes. It works... and reads data from Firebird SQL. -- ======================================================================== === John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== === |
Thanks for detailed clarifications. pf
On 16.10.2007, at 21:37, John M McIntosh wrote: > We have lots of FFI in Sophie. > > The key to it is > > (a) being able to find the module that is in the FFI call. Or a > derived name which is based on the module name. > (b) being able to find the module in some path that the Squeak VM > will search in. > > For the os-x carbon VM > See SqueakPluginsBuiltInOrLocalOnly > http://www.smalltalkconsulting.com/html/squeakinfoplist.html > > Once the module is found we find the procedure name, again based on > the information in the Smalltalk method. So for the example below we > expect to find NavCreateNewFolderDialog in Carbon.framework which > is in /System/Library/Frameworks a place where we look > automatically for frameworks. > > Of course the input parms and return value must match expectations, > otherwise you crash the VM, or get an error coecering variables > between Smalltalk objects and C types. > > apiNavCreateNewFolderDialog: aMacNavDialogCreationOptions > eventProc: aEventProc client: data dialogRef: aNavDialogRef > <cdecl: long > 'NavCreateNewFolderDialog' ( MacNavDialogCreationOptions* long > long MacNavDialogRef*) module:'Carbon.framework'> > ^ self externalCallFailed > > "OSStatus NavCreateNewFolderDialog ( > const NavDialogCreationOptions * inOptions, > NavEventUPP inEventProc, > void * inClientData, > NavDialogRef * outDialog > );" > > > The usual problems you run into is finding and loading the module. > The os-x carbon VM has a SqueakDebug info.plist value you can set > to 1 to help debug this issue. > After finding the module the next issue likely is coding a proper > parm list and then giving it the correct objects. > save image often, cross fingers... > > > On Oct 16, 2007, at 12:20 PM, Petr Fischer wrote: > >> Yes. It works... and reads data from Firebird SQL. > > -- > ====================================================================== > ===== > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. http:// > www.smalltalkconsulting.com > ====================================================================== > ===== > > > > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |