RFile & RFs error

Login to reply to this topic.
Thu, 2006-10-19 09:15
Joined: 2006-10-19
Forum posts: 18
Hi everybody!

I have a problem with Rfile & RFs. I think you have already seen the errors :

Code:
Undefined Symbol: 'int RFs::Connect(int) (?Connect@RFs@@QAEHH@Z)' ...
Undefined Symbol: 'int RFile::Open(class RFs &,class TDesC16 const &, unsigned int) (?Open@RFile...

I read a lot of things about these errors, like including the efsrv.lib but it doesn't work and I'm going to become crazy. Here's a short sample of my code but I think there's no error :

Code:
User::LeaveIfError(fsSession.Connect());

TInt err=file.Open (fsSession,KWorksDataFile,EFileStreamText|EFileWrite|EFileShareAny);

if (err==KErrNotFound)
err=file.Create(fsSession,KWorksDataFile,EFileStreamText|EFileWrite|EFileShareAny);
   

I use Carbide.C++ to manage my project. Perhaps the problem comes from here.

I don't know.

Please help Cry

Thu, 2006-10-19 09:52
Joined: 2005-11-16
Forum posts: 62
Re: RFile & RFs error
Hi ..
plz check whether you have included the header file f32file.h ?

regards
Badshah
Thu, 2006-10-19 09:59
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: RFile & RFs error
Quote from: nico
...
I read a lot of things about these errors, like including the efsrv.lib but it doesn't work and I'm going to become crazy. Here's a short sample of my code but I think there's no error
...

Did you try to build the project from command prompt amd have you re-imported the project after putting the efsrv.lib in your MMP?

Thu, 2006-10-19 10:01
Joined: 2006-10-19
Forum posts: 18
Re: RFile & RFs error
Yes I included the header file f32file.h !!!

And the efsrv.lib is included in my MMP for a long time now. I always rebuild the entire project.

It's totally crazy Huh
Thu, 2006-10-19 17:20
Joined: 2006-03-04
Forum posts: 194
Re: RFile & RFs error
What happens if you build from the command line?
Fri, 2006-10-20 08:28
Joined: 2006-10-19
Forum posts: 18
Re: RFile & RFs error
If I build from the command line, I have another problem I didn't manage to solve. I suppose it's a problem of path but I don't really understand why. Here's the report :

Code:
Creating \Symbian\UIQ3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileClientUIQ
3\group\MOBILECLIENTUIQ3\WINSCW\UDEB
  make -r  -f "\Symbian\UIQ3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileCli
entUIQ3\group\WINSCW.make" TARGET CFG=UDEB VERBOSE=-s
make -s  -r -f "\Symbian\UIQ3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileCl
ientUIQ3\group\MOBILECLIENTUIQ3\WINSCW\MOBILECLIENTUIQ3.WINSCW" UDEB
MobileClientUIQ3View.cpp
process_begin: CreateProcess((null), mwccsym2.exe -g -O0 -inline off -wchar_t of
f -align 4 -warnings on -w nohidevirtual,nounusedexpr -msgstyle gcc -enum int -s
tr pool -exc ms -trigraphs on -nostdinc -d _DEBUG -d _UNICODE -d __SYMBIAN32__ -
d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -c
wd source -i- -i \Symbian\Carbide\workspace\MobileClientUIQ3\inc -i \Symbian\Car
bide\workspace\MobileClientUIQ3\data -i \Symbian\UIQ3SDK\EPOC32\include -i \Symb
ian\UIQ3SDK\EPOC32\include\variant -i \Symbian\UIQ3SDK\epoc32\include\variant -i
"\Symbian\UIQ3SDK\epoc32\include\variant\ " -include UIQ_3.0.hrh -o \Symbian\UI
Q3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileClientUIQ3\group\MOBILECLIENT
UIQ3\WINSCW\UDEB\MobileClientUIQ3View.o -c \Symbian\Carbide\workspace\MobileClie
ntUIQ3\src\MobileClientUIQ3View.cpp, ...) failed.
make (e=2): File not found.
make[1]: *** [\Symbian\UIQ3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileClie
ntUIQ3\group\MOBILECLIENTUIQ3\WINSCW\UDEB\MobileClientUIQ3View.o] Error 2
make: *** [TARGETMOBILECLIENTUIQ3] Error 2
  make -r  -f "\Symbian\UIQ3SDK\EPOC32\BUILD\Symbian\Carbide\workspace\MobileCli
entUIQ3\group\WINSCW.make" FINAL CFG=UDEB VERBOSE=-s

If you can determine the problem, it would be great Smiley
Mon, 2006-10-23 05:01
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: RFile & RFs error
I used to get this error, so after a long RnD I solved the issue by changing the path from long file name to DOS supporting file name. For example the path like this:

Quote
C:\Program Files\Common Files\Symbian\tools\

should be changed to:

Quote
C:\Progra~1\Common~1\Symbian\tools\

From the dos prompt enter this command:
Quote
C:\>dir/x

This displays the short names generated for non-8dot3 file names.

Wed, 2006-10-25 07:07
Joined: 2006-04-23
Forum posts: 45
Re: RFile & RFs error
Quote from: nico
Hi everybody!

I have a problem with Rfile & RFs. I think you have already seen the errors :

Code:
Undefined Symbol: 'int RFs::Connect(int) (?Connect@RFs@@QAEHH@Z)' ...
Undefined Symbol: 'int RFile::Open(class RFs &,class TDesC16 const &, unsigned int) (?Open@RFile...

I read a lot of things about these errors, like including the efsrv.lib but it doesn't work and I'm going to become crazy. Here's a short sample of my code but I think there's no error :

Code:
User::LeaveIfError(fsSession.Connect());

TInt err=file.Open (fsSession,KWorksDataFile,EFileStreamText|EFileWrite|EFileShareAny);

if (err==KErrNotFound)
err=file.Create(fsSession,KWorksDataFile,EFileStreamText|EFileWrite|EFileShareAny);
   

I use Carbide.C++ to manage my project. Perhaps the problem comes from here.

I don't know.

Please help Cry


I guess you r not doing this
RFs fsSession;
RFile file;
include the header file f32file.h  and library efsrv.lib .
It should work

Wed, 2006-10-25 08:41
Joined: 2006-10-19
Forum posts: 18
Re: RFile & RFs error
Thank you guys. I find a solution including this line (I found this in the doc) :

Code:
#pragma comment(lib,"efsrv.lib")

Now it works Smiley
Wed, 2006-10-25 09:34
Joined: 2004-11-29
Forum posts: 1156
Re: RFile & RFs error
Your problem is most probably that the developers of carbide wants to reinvent the build process of some reason...

In the express version, I don't think they have support for mmp files at all, you have to add the lib in the project settings from within carbide, in their menues...

Stupid move imo, i think it was a really nice idea with an ide agnostic config, where you generate project files to whatever ide you like to use, but still keep all config in the same place.
  • Login to reply to this topic.