SQLITE File is not opened by compiled app
Posted: Thu May 31, 2012 7:11 pm
Some strange things are going on on OSX:
I have an app that is used for quite awhile now on Win7 and it utilizes a sqlite database file.
Trying to make the app run on OSX and when I run it from the IDE it works but when the app is compiled the sqlite file is not found (resides in the same directory).
Went to the example directory and compiled the database example. It writes an sqlite file and opens it... it works.
One difference I saw is that Finder tells me that the newly generated sqlite file (from the example) is a "document" while the sqlite file that came from a Win7 machine (from my app) is a "unix executable file".
Changing the file attributes with chmod doesn't help; also when I list the files with ls -l the file has a @ right after the file attributes. (which tells me that the file has extended file attributes)
On the net I found some info were they talk about moving files from Windows to OSX can cause the wrong file type thingy, but in reality I don't know if this is actually causing the compiled app not to find the sqlite file.
As I said running the app from the IDE the sqlite file is found...
I also tried to add a "./" like it might be needed on Linux or to use the GetCurrentDirectory() function but the resulting directory seems to link inside the app bundle...
Maybe the error is that the compiled file automatically gets the ".app" extension but I don't know if it actually is an app bundle or not.
(IncludeBinary is used to insert an image file into the executable)
Maybe deleting the extension will solve the problem; I don't know - still learning while going....
I'm thankful for any help.
Thanks for reading
fsw
I have an app that is used for quite awhile now on Win7 and it utilizes a sqlite database file.
Trying to make the app run on OSX and when I run it from the IDE it works but when the app is compiled the sqlite file is not found (resides in the same directory).
Went to the example directory and compiled the database example. It writes an sqlite file and opens it... it works.
One difference I saw is that Finder tells me that the newly generated sqlite file (from the example) is a "document" while the sqlite file that came from a Win7 machine (from my app) is a "unix executable file".
Changing the file attributes with chmod doesn't help; also when I list the files with ls -l the file has a @ right after the file attributes. (which tells me that the file has extended file attributes)
On the net I found some info were they talk about moving files from Windows to OSX can cause the wrong file type thingy, but in reality I don't know if this is actually causing the compiled app not to find the sqlite file.
As I said running the app from the IDE the sqlite file is found...
I also tried to add a "./" like it might be needed on Linux or to use the GetCurrentDirectory() function but the resulting directory seems to link inside the app bundle...
Maybe the error is that the compiled file automatically gets the ".app" extension but I don't know if it actually is an app bundle or not.
(IncludeBinary is used to insert an image file into the executable)
Maybe deleting the extension will solve the problem; I don't know - still learning while going....
I'm thankful for any help.
Thanks for reading
fsw