Problem with SQLite

Started by Pebender, May 05, 2021, 15:58:18

Previous topic - Next topic

Pebender

Hi,
i have a little problem with the SQLite mod in BMax NG,
I copied the Files in the BAH folder, I Build the Modules and if I start a example, there comes a error " CanĀ“t find Interface for module 'bah.sqlite'".
Know somebody, how i can Solve this problem??

regards

Henri

#1
Hi,

'Interface not found' means that the module did not build.

Check your folder structure. Sqlite-mod should be in <bmax-folder>/mod/bah.mod/dbsqlite.mod .Also you need the bah.mod/database.mod as well.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Pebender

Hi,
I know the folder ist right, the modules are build......

Derron

Maybe because it is called bah.dbsqlite and not bah.sqlite?

check the online version of the repository ...
https://github.com/maxmods/bah.mod/blob/master/dbsqlite.mod/tests/test_01.bmx


bye
Ron

Henri

#4
Good catch there Ron. Indeed dbsqlite.mod is correct.


@Pebender

Did you copy the database.mod as well ?

There should be bunch of files ending with *.i and *.a in the dbsqlite.mod folder if it was built correctly.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Krischan

If you have problems compiling this mod, I've uploaded two ZIPs of my own BlitzmaxNG mod folder - so you can just extract it from the BAH zip file (Windows only). I remember that I've had initially some problems with some mods and had to change a few variable declarations but all these mods compiled successfully in Debug/Release mode and threaded (and even using BLIDE for the build process :-D )

Vanilla Modules
BlitzMaxNG mod compiled

Bruceys Modules
BlitzMaxNG bah.mod compiled.zip

Some of Bruceys mods are missing there as it looks like there are more changes necessary than some variable declarations to make them run. Or I'm just too dumb.

BAH mods not included are:
- cairo.mod
- cairowin32.mod
- cairoxcb.mod
- cegui.mod
- ceguidirect3d9.mod
- ceguiopengl.mod
- curses.mod
- dboracle.mod
- gdal.mod
- glslopt.mod
- graphviz.mod
- graphvizmax2d.mod
- libtcod.mod
- libtorrent.mod
- opencl.mod
- redis.mod
- sid.mod
- sidbass.mod
- taglib.mod
- tesseract.mod
- xlwriter.mod
- zint.mod
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
Metaverse | Blitzbasic Archive | My Github projects

Henri

#6
From Krischan's list at least Cairo works as I use it regularly.

Sometimes it's convenient to build single module from command line if you make changes to it, or want to make sure that specific module was built for sure.


Example:

Open cmd in <blitzmax>/bin folder and type (without the mod extension):

bmk makemods -a bah.dbsqlite

There should be some feedback from executing this command, and if not, then most likely there was a typo in the module scope.


-Henri
- Got 01100011 problems, but the bit ain't 00000001

Krischan

Henri, I've double-checked this again and yes, you're right.

The error looks like this:
Compile Error: Unable to find overload for ft_new_memory_face(Byte Ptr,Byte Ptr,size_t,Int,Byte Ptr). Argument #3 is "size_t" but declaration is "Int".
[C:/Apps/Coding/BlitzMaxNG/DATA/{DATA-2345987902345}/BlitzMax/mod/bah.mod/cairo.mod/externs.bmx;419;0]

Which means the error is a wrong variable type declaration in Line 419 of file externs.bmx. I had only to change a single line in externs.bmx to make it compile:

from

If FT_New_Memory_Face( ft_lib,buf,buf_size,0,Varptr ft_face )

to

If FT_New_Memory_Face( ft_lib,buf,int(buf_size),0,Varptr ft_face )

The 3rd parameter "buf_size" must be INTed first, and then the compilation works. I've seen this several times when I tried to compile a new module (often when a filesize var is used). I am not sure why this hasn't been changed in Bruceys Modules yet, but most modules are easy to fix to run with NG again.
Kind regards
Krischan

Windows 10 Pro | i7 9700K@ 3.6GHz | RTX 2080 8GB]
Metaverse | Blitzbasic Archive | My Github projects

Pebender

Hi,

QuoteExample:

Open cmd in <blitzmax>/bin folder and type (without the mod extension):

Code: [Select]

bmk makemods -a bah.dbsqlite


There should be some feedback from executing this command, and if not, then most likely there was a typo in the module scope.

nothing happens........

Henri

Can you open File Explorer (I'm assuming you are in Windows) and go to dbsqlite folder and copy/paste whats in the address bar here ?

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Pebender

Hi,

C:\BlitzMax\mod\BaH\dbsqlite.mod

you mean this?

Henri

Yep. See my post 2.

Change Bah -> bah.mod and you are good to go. Letter case is not important, but all module folders should end in .mod

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Pebender

and suddenlyyyyyyyyyyy it works :P

Thanks