First, be sure you have used inclusion gaurds in all of your header files. See code posted by major_small for an example of the necessary syntax if you aren't familiar with it.
Then, trying to piece things together, in the class declaration for DataAll you declare sqlite_path and user to be static variables with these lines:
static const char* sqlite_path;
static Uporabnik user;
Then you say you do define sqlite_path in all cpp files
>Here's the code that I use in all .cpp files:
by doing this:
>const char* DataAll::sqlite_path = "program.db";
However, since DataAll::sqlite_path is a static variable, this amounts to multiple definition of sqlite_path, as that sort of statement should only be made once, usually in the header file where DataAll is declared. Again, see major_smalls code for an example. I don't see DataAll::sqlite_path listed in the series of error statements you have posted:
>I still get an error from linker:
and I don't see that you do the same sort of thing with DataAll::user as you do with DataAll::sqlite_path in the code you posted, though I do see the multiple definition error for DataAll::user
>multiple definition of `DataAll::user'
so I suspect that you are doing the same thing with DataAll::user, and the other static variables that are listed in the error statements posted, that you do with DataAll::sqlite_path and I suspect that there is a multiple definition error statement with DataAll::sqlite_path in it some place in the list of errors that didn't get posted.
If you want to use a DataAll object in several different cpp files then define the static variables just once, in DataAll.h, as per major_smalls example and include the DataAll.h header file in each file that uses the DataAll object. Then you can use the static variables as you would other variables of the object, again, see major_smalls code for an example.