Can't find interface for module 'pyropixel.sqliter

BlitzMax Forums/BlitzMax Beginners Area/Can't find interface for module 'pyropixel.sqliter

jonwalker(Posted 2009) [#1]
Hi,

I'm trying to add database support for my game. My understanding is that SQLite is one of the better options for this. I've found SQLiter a MOD addin for Blitzmax. However I've been unable to find any installation instructions on the MOD website:
http://www.pyroplay.de/sqliter.html

I've tried copying the download into the MOD folder so I now have:
C:\Program Files\BlitzMax\mod\sqliter_v105\pyropixel.mod
C:\Program Files\BlitzMax\mod\sqliter_v105\tm.mod

On trying to excute a sample file (included in the doc folder) I get the error from BlitzMax:
Compile Error: Can't find interface for module 'pyropixel.sqliter'

Searching the forums for this error gives me the post:
http://www.blitzbasic.com/Community/posts.php?topic=59937#682647

This leads me to the response "you have to compile the module with BlitzMax' bmk tool.". From the help file in MaxIDE the bmk tool is:
"BMK is a command line tool that drives the BlitzMax compiler and provides other general 'housekeeping' operations."

I'm on Windows XP so I've Start/run cmd.exe to open a command prompt. Then changed to the bin folder as in:
cd C:\Program Files\BlitzMax\bin

Then launched the makemods option on bmk as in:

bmk makemods -a

This ran for about 5 minutes compiling various files.

Attempting again to launch the demo program the error persits "Compile Error: Can't find interface for module 'pyropixel.sqliter'".

Other posts imply a connection to something called "MinGW" which is another download.

My questions remain and I've added a new question...
Have I stuffed up my installation of BlitzMax?
What are the installation instructions for SQLiter?
What is the purpose of MinGW?

Thanks, Jon


xlsior(Posted 2009) [#2]
Attempting again to launch the demo program the error persits "Compile Error: Can't find interface for module 'pyropixel.sqliter'".


I took a look at it, and it appears that you didn't put the folders in the correct location -- they should be here:

c:\program files\blitzmax\mod\pyropixel.mod
c:\program files\blitzmax\mod\tm.mod

That 'sqlliter_v105' should not be part of the path... Perhaps a bit confusing on how they packaged the RAR file. :-?

(When Blitzmax is trying to open 'pyropixel.sqliter', it's actually looking for the '\mod\pyropixel.mod\sqliter.mod' folder)

What is the purpose of MinGW?


MinGW is a C compiler -- It is used to compile modules to libraries that Blitzmax can interface with. Some modules are distributed in compiled form already, but if you are using a different version of Blitzmax that has some structural changes on the back-end, you may need to recompile the module in order for it to work with the latest version of Blitzmax. If you don't use any 3rd party modules you can get by without MinGW, but if you do use them you'll find that sooner or later you need MinGW to get things to function properly.


Tommo(Posted 2009) [#3]
BMax has all its modules put under BMXPATH/mod/
You have to copy pyroixel.mod and tm.mod to there, so the compiler can find them.

MinGW is a set of compilers/tools/libraries. BMax need GCC from it to compile C/C++ codes within bmax modules, then you can use libraries written in C/C++ in bmax.


xlsior(Posted 2009) [#4]
And just an FYI: there is another SQLite module for blitzmax, made by Brucey: http://code.google.com/p/maxmods/

(Source only, you'll definitely need MinGW to compile that one)


jonwalker(Posted 2009) [#5]
Thanks for the replies. I've tried moving the included folders so they are:

C:\Program Files\BlitzMax\mod\pyropixel.mod
C:\Program Files\BlitzMax\mod\tm.mod

I've then opened the example file from:
C:\Program Files\BlitzMax\mod\pyropixel.mod\sqliter.mod\example\demo1.bmx

Trying to launch the file from Ctrl+R continues to give the error:
Compile Error: Can't find interface for module 'pyropixel.sqliter'

Do I need to somehow get the compiter to make the module file? It appears to be in:
C:\Program Files\BlitzMax\mod\pyropixel.mod\sqliter.mod\sqliter.bmx

I did first look at the SQLite module by Brucey, however I could not locate any tutorials or instructions on it's use. SQLiter does at least have some documentation, but it assumes that you know how to install it.

Thanks, Jon


Brucey(Posted 2009) [#6]
I did first look at the SQLite module by Brucey, however I could not locate any tutorials or instructions on it's use.

I really need to spend some time on this - and module installing in general.

Any time you see something like this :
Compile Error: Can't find interface for module 'pyropixel.sqliter'

..either the module is installed incorrectly, or it hasn't been built yet.


jonwalker(Posted 2009) [#7]
Hi Brucey,

It would make a difference for people new to the system. :o)

I assume the installation is as simple as copying the files? How can I check to see if the module is built and if it's not how do I build it?

Thanks, Jon


Floyd(Posted 2009) [#8]
The modules distrubuted with BlitzMax are pre-built. No further action is needed.

Something like sqliter is probably source only. After building a module you will see ( on Windows ) various files with .a and .i extensions.

The .a files are archives of compiled code. The .i means ( I assume ) interface and is plain text. You can look at those files with Notepad.

You can build all modules at once from the IDE. You can also build individual modules from the command line. I haven't done this in years and don't remember the details. It's in the documentation somewhere.


xlsior(Posted 2009) [#9]
to do it from the command line, go to the blitzmax\bin folder and run the following:

bmk makemods -a sqliter
bmk makemods -a -h sqliter
bmk makemods -a tm
bmk makemods -a -h tm

For this to work you do need to have MinGW installed properly, though. There's instructions on how to do that on the forums, there's a little more to it than just running the installer.


jonwalker(Posted 2009) [#10]
Many thanks for all the help on this. :o) The documentation in BlitzBasic may not be great but the people in the forums are most helpful.

For reference for other programmers having similar issues the way to make the module is:
bmk makemods pyropixel.sqliter

The name "pyropixel.sqliter" is the name of the module as declared in the source file, I only found this be opening up sqliter.bmx and then finding the line:
Module pyropixel.sqliter

The Command Line options can be found in the BlitzMax Help from Help/User Guide/BMK. For making modules the relevant ones are:

-d Build debug version only. By default, both debug and release versions are built.
-r Build release version only. By default, both debug and release versions are built.
-h Build multithreaded versions. By default, single threaded versions only are built.
-a Build all modules regardless of timestamps. By default, only modules that have been modified are built.

At present I am unaware of the merits of multithreaded versions and it appears you need to make the choice at the point of building the MODs.

When installing MinGW you need to make sure it's the latest version and after copying the files (in Windows at least) set the PATH environment variable to include the bin folder.

I've lost a day coding finding this information out, I hope by including this information in one thread the reader won't. :o)

Thanks, Jon


xlsior(Posted 2009) [#11]
At present I am unaware of the merits of multithreaded versions and it appears you need to make the choice at the point of building the MODs.


Normally the non-multithreaded version is sufficient, but having both modules built also allows you to enable the multi-threaded build mode in the IDE.
Picking threaded enables some additional commands regarding hyperthreading, but even in single threaded mode there may be some differences in the performance of your application due to the different garbage collector used. (Amount of memory used and execution speed may vary slightly, even if you don't use any of the multithreading commands)