Creating and Linking the dll in UIQ3

Login to reply to this topic.
Thu, 2008-02-28 12:21
Joined: 2008-02-15
Forum posts: 23

Hi,

My purpose is to create a dll that I will call in java but that's the second part. Write now I am unable to produce a working dll. That dll will get network information using the etel3dparty.lib.
1.) I am using Carbide 1.2
2.) I tried creating a new project:
a.) lib
b.) dll and also tried
3.) I tried creating another project (UIQ3 GUI Application) where I can link either the dll or the lib.
4.) When I tried a.) lib: I only have

#ifndef ___NETWORKINFO_H__
#define ___NETWORKINFO_H__
#include <e32base.h>
TInt DummyFunction();
#endif  // ___NETWORKINFO_H__

in my header file

and it's implementation in the cpp file

#include "_NetworkInfo.h"
TInt DummyFunction()
	{
	return 0;
	}

I tried including the .lib file in my .mmp file call the function but it failed i think this is the error
[error]
make -r -f "\Symbian\UIQ3SDK\EPOC32\BUILD\Carbide_1_2\app\_SampleDLL\group\WINSCW.make" TARGET CFG=UDEB
make[1]: *** No rule to make target `\Carbide_1_2\app\_SampleDLL\group\_NetworkInfo.h', needed by `\Symbian\UIQ3SDK\EPOC32\BUILD\Carbide_1_2\app\_SampleDLL\group\_SAMPLEDLL\WINSCW\UDEB\_SampleDLLAppUi.o'. Stop.
make: *** [TARGET_SAMPLEDLL] Error 2
[/error]

using b.) Well I'm not sure how to link the dll...

5.) Therefore which one is the best to use a lib or a dll. Again I am going to put my application that links to etel3rdparty and gets network information like cell id, etc.

6.) Is there any resources out there, for newbie ones... (Yes i tried google...)

Thanks and good day


Thu, 2008-02-28 13:25
Joined: 2004-11-29
Forum posts: 1134
Re: Creating and Linking the dll in UIQ3

Thats not a link error, that is a compile error.
It can't find the header file "_NetworkInfo.h"

Make sure it exists in a folder that is included with "USERINCLUDE" in your mmp file.
And the error seems to be from when you try to build the DLL, not from when you are trying to link it into your UIQ app...

lib or dll depends on how you are going to use it, and is 100% up to what you think is the most convenient for whatever you want to do...

What kind of resources are you looking for?
There is "Tutorials" on this site, look up there to the top left... checked those?

Fri, 2008-02-29 02:38
Joined: 2008-02-15
Forum posts: 23
Re: Creating and Linking the dll in UIQ3

Thanks for the reply, yes maybe it was a missing header file though I've checked and saw that it resides in ./epoch/includes dir.
Anyway what I want to create is a dll or a lib that gets Network Information such as cell id, etc. using the CTelephony class from etel3rdparty.h/.lib. because I am to call this dll in java CDC. Given that what can you recommend to use dll/lib.

Yeah I'm a newbie in symbian...

Thanks and good day.

Fri, 2008-02-29 09:16
Joined: 2004-11-29
Forum posts: 1134
Re: Creating and Linking the dll in UIQ3

"_NetworkInfo.h" is your own header file, no?
You at least give the source code to it too, so I assumed so...
Then it should not be in epoc32/include/ but somewhere in your own project...

Unfortunately I know nothing about Java CDC and inter-op with native C++, so can't help you there...

Mon, 2008-03-03 04:26
Joined: 2008-02-15
Forum posts: 23
Re: Creating and Linking the dll in UIQ3

Hi,

Thanks for the reply.

I tried creating a new lib project in carbide 1.2 the default basic simple one after that i compiled it.
*header file

#ifndef __SampleDLL_H__
#define __SampleDLL_H__
#include <e32base.h>
TInt DummyFunction();
#endif  // __A_H__

*cpp file

#include "SampleDLL.h"
TInt DummyFunction()
	{
	return 0;
	}

LIB
That's all the content in the code. After compilation I saw a SampleDLL.h in my ./epoch/include directory and if I add a library in mmp there is SampleDLL.lib on my new GUI UIQ3 Application, so I assumed I compiled it correctly. Do I need to paste the lib or header in any special directory?
Why does the header file doesn't have a class name? Is it a compiler issue? Because when I tried adding a class name in SampleDLL.h if will have a compile time error and when I tried not to I can include the .h and it's .lib but I cannot call the function.

DLL
The code is the same as the default provided by Carbide 1.2.
However when I compiled my GUI UIQ3 Application I got an error missing library SampleDLL. BTW when I have a .lib file I can include it in .mmp file but if DLL where should I link it.

I just want to create a dll and include it in my UIQ3 GUI Application using Carbide 1.2 IDE.

Thanks and good day.

  • Login to reply to this topic.