hi all,
i need to create an user defined library in Symbian c++.
and use it in my projects .
can any one suggest me how to do so
regards
Arun Gupta
hi all,
i need to create an user defined library in Symbian c++.
and use it in my projects .
can any one suggest me how to do so
regards
Arun Gupta
What you mean by "user defined library"?
Anyway check this section in the SDK documents - How to build DLLs
And of course there is an example in the SDK already: Examples\Basics\StaticDLL
Most of the APIs you use are ... static DLLs. You use the APIs provided by your DLL like any other, you add a LIBRARY statement to the MMP file pointing to your link library and then use the API in the project making sure to include the needed header file.
-- Lucian
That particular example also shows the usage: you add a reference to your library into a LIBRARY line, the same way as euser.lib, avkon.lib, etc.
Note that you have to 'freeze' a .dll project in order to get the .lib file generated
- Carbide offers a Freeze command for the project
- 'abld freeze' also does that in the command line
- for development and experimenting, you can also specify EXPORTUNFROZEN keyword in the .mmp, and your import library is going to be generated even if the project is not frozen ('unfrozen').
i used the freeze export it generated a folder bwins but when i execute the same in the command prompt inside the group i get an error like
ERROR: EPOCROOT must be an absolute path, not containing a drive letter.
through command prompt
1)what should i do? to remove this
through IDE
2) it created the def file but how to use is still a mystery for me..
regards
Arun Gupta
That message is a bit misleading, generally said you should prefer usage of 'devices' command instead of usage of 'EPOCROOT' environment variable.from the command line sould not show anything.Code:set EPOCROOT
If it does,removes the variable.Code:set EPOCROOT=
Thenshould list your SDK-s, make sure that the one you are planning to use is marked as 'default'.Code:devices
If not,changes the default. The space and the @ are important, and you have to use the complete name, like "devices -setdefault @S60_3rd_MR:com.nokia.s60".Code:devices -setdefault @....You simply write it into the .mmp file of the other project. As already said, every .lib file you use is such an import library for .dll-s, so the usage of yours will not differ:2) it created the def file but how to use is still a mystery for me..Code:LIBRARY euser.lib // this line links with the .lib file created for euser.dll LIBRARY your.lib // <- so if you have your.dll, and the library creation succeeded, this line will link with its import library