Maybe RTOS kernel does not implement Wide-Char functions... Windows VFS must guard them with a SQLITE_WINDOWS_NO_UNICODE macro or something like that at compile time, but you should do it yourself... then you can contribute it back to SQLite.
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kent Dahl Sent: segunda-feira, 27 de abril de 2009 09:58 To: General Discussion of SQLite Database Subject: [sqlite] Using SQLite3 on On-Time RTOS ... Hi. I wondered whether anyone is using SQLite3 on the On-Time RTOS platform, and if so, if there are any patches or tips to help others along? We've been giving the SQLite 3.6.10 amalgamation source code for Windows a try against RTOS 5.14 and it compiled out of the box. However, we ran into some linker and run-time errors. After a fair amount of experimenting, we got it up and running, but only towards an in-memory database. We still have problems opening existing or creating database files. I'll outline what we ran into and what we've tried so far. The linker errors were primarily towards wide char APIs that didn't exist on RTOS. Most of these could easily be ifdef'd away. There was alternate Win95/98/ME code we could trigger if we changed "isNT" to 0, which helped a bit. Some, like AreFileApisANSI we just defined to 1. We then ran into a crasher caused by convertUtf8Filename returning NULL, so we changed that to use a fallback. Just strdup-ing the input string if the conversion failed. Debugging this took a little while, because using the amalgamation source meant that the RTOS compiler crossed a 64k symbols limit, meaning breakpoints and backtraces broke badly. Finally we had something that linked and ran, but only towards in-memory database. When we tried to open an existing database (or create a new one) using the sqlite3_open_v2 API, it kept returning SQLITE_NOMEM(7). When I tried debugging this, I got as far as the sqlite3BtreeFactory call, but because of the breakpointing problems I didn't get much further. So, my questions then are: * Is anyone using or have used SQLite3 on RTOS? * Are the older Win95/98/ME code paths still actively used, tested and found to be working? (Or should I expect a few inches of legacy dust and bugs in them?) * Is there a good way to get more debug information? (SQLITE_DEBUG seems more targetted at debugging SQL statements.) * Am I barking up any of the wrong trees? Hope someone out there has some ideas or pointers to help me get motivated enough to give another stab at it. :) ===== Additional information ===== === Linker errors === Example linker error: "Error: DLL dependency in CDP.EXE: KERNEL32.dll.DeleteFileW" These APIs also gave linker errors: - LockFileEx - GetTempPathW - GetFullPathNameW - GetDiskFreeSpaceW - AreFileApisANSI === References === * On-Time RTOS - http://www.on-time.com/ -- Mvh/Regards, Kent Dahl Software Developer Industrial Control Design AS Phone: +47 93 07 32 30 Breivika Industriveg 63 N-6018 Ålesund Norway k...@icd.no www.icd.no The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the System Manager i...@icd.no and delete the material from any computer. _______________________________________________ sqlite-users mailing list email@example.com http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list firstname.lastname@example.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users