Trolltech Home | Qt-embedded-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-embedded-interest Archive, December 2006
Linking error in the Application


Message 1 in thread

Hi All,
I am using qt-2.3.10 and qtopia-2.1.1.
In my application after make it is giving following linker error message.

.obj/release-shared/Main_ProcessingImpl.o:(.bss+0x20): multiple
definition of `tm_oldtime'
.obj/release-shared/drawgraphs.o:(.bss+0x0): first defined here
.obj/release-shared/Main_ProcessingImpl.o:(.bss+0x60): multiple
definition of `tm_newtime'
.obj/release-shared/drawgraphs.o:(.bss+0x40): first defined here
.obj/release-shared/Main_ProcessingImpl.o:(.bss+0x8c): multiple
definition of `t_oldtime'

But actually  tm_oldtime is only declared  in drawgraphs.h file and
used only in drawgraphs.cpp file.

I am inluding drawgraphs.h file in Main_ProcessingImpl.h file.
Similar type of error messages are  fallowed.


If you have Any idea  whay it is giving linking problem kindly let me know.

Thanks in advance,

Regards,
Harsha

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 2 in thread

Hi Andy,
Thanks for your reply.

In my main_processingImpl.h is like below.

#ifndef MAINPROCESSINGFORMIMPL_H
#define MAINPROCESSINGFORMIMPL_H

#include "Main_Processing.h"
#include <qevent.h>
#include <qwidget.h>

//////// all variables and function declarations here.........

#endif


And drawgraph.h is as below

#ifndef _DRAWGRAPHS_H_
#define _DRAWGRAPHS_H__
#include "math.h"
#include "ANSAlgo.h"
#include <string.h>
#include <time.h>

/****ECG Graph*****/
	
	void DrawHGrid(float yaxis);
	void DrawVGrid(float xaxis);
	void DrawHLine(float yaxis);

	void initializeECGgraph();
	
//int InitGL_ecg(GLsizei width, GLsizei height);
	void DrawECG();
	void maintainRRmark();
	void render_ecg();
	void maintainECGgraph(int ecgdata);
        void ClearECG();

	float ecg_y[400];
        float ecg_x[400];
	int rrmark[400];
        int ecg_fulllength;
        int ecg_countlength;


/****ANSindices Graph*****/

	void render_ANSindices();
	void DrawANSindices();
	void initializeANSindicesgraph();
	void maintainANSindices(float balIndex,float symIndex,float
paraIndex,char *sTime);
	void ClearANSindices();
	void initializeANSindicesgraphParam();

	typedef struct
	{
		char sTime[10];
		int grid;
	}STIME;
	
	STIME *IndexTime[2];
	float *balIndexPoints[2];
	float *symIndexPoints[2];
	float *paraIndexPoints[2];
	int *markNotes[2];
	
	STIME HistoryIndexTime[2000];
	float HistorybalIndexPoints[2000];
	float HistorysymIndexPoints[2000];
	float HistoryparaIndexPoints[2000];
	int HistorymarkNotes[2000];

        float index_x[200];
        int ANSindex_HistoryCount;
        int ANSindex_HistoryFull;
	int ANSindex_CurrentDisplayPoint;
	int ANSindex_firlen;
	int ANSindex_seclen;

/****balANS Graph*****/
	void initializebalANSgraph();
	void render_balANS();
	void ClearbalANS();

/****StaticbalANS Graph*****/
	void initializeStaticbalANSgraph();
	void render_StaticbalANS();
	void ClearStaticbalANS();

	int makeRasterFont();
	void printString(char *str);
	int checkTimeInterval(char *strnewtime);
	void initTimeInterval();
	
	time_t t_newtime;
	time_t t_oldtime;
	
	struct tm tm_newtime;
	struct tm tm_oldtime;

#endif


In my  Main_ProcessingImpl.cpp i included
#include "drawgraphs.h"

Thats all.

I called one of the function from here which is defined in drawgraphs.cpp

But it is giving linking error for all the variables which are
declared in drawgraphs.h

as mentioned in previous message.

If you have any suggestions kindly let me know.

Thanks

Regards,
Harsha






On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx> wrote:
>
> Hi!
>
> You could try some sort of "include guard"
>
> in file drawgraphs.h at the very beginning something like:
>
> #ifndef DRAWGRAPHS_H
> #define DRAWGRAPHS_H
>
> and at the end of the file as last line:
> #endif // DRAWGRAPHS_H
>
> So the multiple definitions should be avoided.
>
> hth!
>
> Bye,
> Andy
>
> "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on 13.12.2006
> 13:37:18:
>
>
>  > Hi All,
>  > I am using qt-2.3.10 and qtopia-2.1.1.
>  > In my application after make it is giving following linker error message.
>  >
>  > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x20):
> multiple
>  > definition of `tm_oldtime'
>  > .obj/release-shared/drawgraphs.o:(.bss+0x0): first
> defined here
>  > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x60):
> multiple
>  > definition of `tm_newtime'
>  > .obj/release-shared/drawgraphs.o:(.bss+0x40): first
> defined here
>  > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x8c):
> multiple
>  > definition of `t_oldtime'
>  >
>  > But actually  tm_oldtime is only declared  in drawgraphs.h file and
>  > used only in drawgraphs.cpp file.
>  >
>  > I am inluding drawgraphs.h file in Main_ProcessingImpl.h file.
>  > Similar type of error messages are  fallowed.
>  >
>  >
>  > If you have Any idea  whay it is giving linking problem kindly let me
> know.
>  >
>  > Thanks in advance,
>  >
>  > Regards,
>  > Harsha
>  >
>  > --
>  > To unsubscribe - send "unsubscribe" in the subject to qtopia-
>  > interest-request@xxxxxxxxxxxxx
>  >
>

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 3 in thread

harshavardhanreddy mandeepala wrote:
> Hi Andy,
> Thanks for your reply.
>
>
> And drawgraph.h is as below
>
> #ifndef _DRAWGRAPHS_H_
> #define _DRAWGRAPHS_H__
                                               ^^^^ 
see the extra underscore in the #define?

Best,

Andre

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 4 in thread

btw, please do not crosspost between multiple lists.


Best regards,

Andre

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 5 in thread

Hi,
Thank to all for your replies,
I tryed by removing extra underscore and also like follows

#ifndef  __DRAWGRAPHS_H__
#define  __DRAWGRAPHS_H__

#endif

But No improvement.

About Namespcae usage i am sure that i am not using multiple names.

I  really don't know why this problem is comming.
Any other suggestions kindly let me know.

Thanks to all once again,

Regards,
Harsha





On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx> wrote:
>
> Hi Harsha!
>
> I guess you allready had a look, if those variables or structs are defined
> elsewhere.
>
> So one thing, you could try is to use a namespace. Not a very beautiful way,
> but it should be at least a workaround.
>
> hth!
>
> Bye,
> Andy
>
>
> "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on 13.12.2006
> 14:02:40:
>
>
>  > Hi Andy,
>  > Thanks for your reply.
>  >
>  > In my main_processingImpl.h is like below.
>  >
>  > #ifndef MAINPROCESSINGFORMIMPL_H
>  > #define MAINPROCESSINGFORMIMPL_H
>  >
>  > #include "Main_Processing.h"
>  > #include <qevent.h>
>  > #include <qwidget.h>
>  >
>  > //////// all variables and function declarations here.........
>  >
>  > #endif
>  >
>  >
>  > And drawgraph.h is as below
>  >
>  > #ifndef _DRAWGRAPHS_H_
>  > #define _DRAWGRAPHS_H__
>  > #include "math.h"
>  > #include "ANSAlgo.h"
>  > #include <string.h>
>  > #include <time.h>
>  >
>  > /****ECG Graph*****/
>  >
>  >    void DrawHGrid(float yaxis);
>  >    void DrawVGrid(float xaxis);
>  >    void DrawHLine(float yaxis);
>  >
>  >    void initializeECGgraph();
>  >
>  > //int InitGL_ecg(GLsizei width, GLsizei height);
>  >    void DrawECG();
>  >    void maintainRRmark();
>  >    void render_ecg();
>  >    void maintainECGgraph(int ecgdata);
>  >         void ClearECG();
>  >
>  >    float ecg_y[400];
>  >         float ecg_x[400];
>  >    int rrmark[400];
>  >         int ecg_fulllength;
>  >         int ecg_countlength;
>  >
>  >
>  > /****ANSindices Graph*****/
>  >
>  >    void render_ANSindices();
>  >    void DrawANSindices();
>  >    void initializeANSindicesgraph();
>  >    void maintainANSindices(float balIndex,float symIndex,float
>  > paraIndex,char *sTime);
>  >    void ClearANSindices();
>  >    void initializeANSindicesgraphParam();
>  >
>  >    typedef struct
>  >    {
>  >       char sTime[10];
>  >       int grid;
>  >    }STIME;
>  >
>  >    STIME *IndexTime[2];
>  >    float *balIndexPoints[2];
>  >    float *symIndexPoints[2];
>  >    float *paraIndexPoints[2];
>  >    int *markNotes[2];
>  >
>  >    STIME HistoryIndexTime[2000];
>  >    float HistorybalIndexPoints[2000];
>  >    float HistorysymIndexPoints[2000];
>  >    float HistoryparaIndexPoints[2000];
>  >    int HistorymarkNotes[2000];
>  >
>  >         float index_x[200];
>  >         int ANSindex_HistoryCount;
>  >         int ANSindex_HistoryFull;
>  >    int ANSindex_CurrentDisplayPoint;
>  >    int ANSindex_firlen;
>  >    int ANSindex_seclen;
>  >
>  > /****balANS Graph*****/
>  >    void initializebalANSgraph();
>  >    void render_balANS();
>  >    void ClearbalANS();
>  >
>  > /****StaticbalANS Graph*****/
>  >    void initializeStaticbalANSgraph();
>  >    void render_StaticbalANS();
>  >    void ClearStaticbalANS();
>  >
>  >    int makeRasterFont();
>  >    void printString(char *str);
>  >    int checkTimeInterval(char *strnewtime);
>  >    void initTimeInterval();
>  >
>  >    time_t t_newtime;
>  >    time_t t_oldtime;
>  >
>  >    struct tm tm_newtime;
>  >    struct tm tm_oldtime;
>  >
>  > #endif
>  >
>  >
>  > In my  Main_ProcessingImpl.cpp i included
>  > #include "drawgraphs.h"
>  >
>  > Thats all.
>  >
>  > I called one of the function from here which is defined in drawgraphs.cpp
>  >
>  > But it is giving linking error for all the variables which are
>  > declared in drawgraphs.h
>  >
>  > as mentioned in previous message.
>  >
>  > If you have any suggestions kindly let me know.
>  >
>  > Thanks
>  >
>  > Regards,
>  > Harsha
>  >
>  >
>  >
>  >
>  >
>  >
>  > On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx>
> wrote:
>  > >
>  > > Hi!
>  > >
>  > > You could try some sort of "include guard"
>  > >
>  > > in file drawgraphs.h at the very beginning something like:
>  > >
>  > > #ifndef DRAWGRAPHS_H
>  > > #define DRAWGRAPHS_H
>  > >
>  > > and at the end of the file as last line:
>  > > #endif // DRAWGRAPHS_H
>  > >
>  > > So the multiple definitions should be avoided.
>  > >
>  > > hth!
>  > >
>  > > Bye,
>  > > Andy
>  > >
>  > > "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on
> 13.12.2006
>  > > 13:37:18:
>  > >
>  > >
>  > >  > Hi All,
>  > >  > I am using qt-2.3.10 and qtopia-2.1.1.
>  > >  > In my application after make it is giving following linker error
> message.
>  > >  >
>  > >  >
> .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x20):
>  > > multiple
>  > >  > definition of `tm_oldtime'
>  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x0): first
>  > > defined here
>  > >  >
> .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x60):
>  > > multiple
>  > >  > definition of `tm_newtime'
>  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x40): first
>  > > defined here
>  > >  >
> .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x8c):
>  > > multiple
>  > >  > definition of `t_oldtime'
>  > >  >
>  > >  > But actually  tm_oldtime is only declared  in drawgraphs.h file and
>  > >  > used only in drawgraphs.cpp file.
>  > >  >
>  > >  > I am inluding drawgraphs.h file in Main_ProcessingImpl.h file.
>  > >  > Similar type of error messages are  fallowed.
>  > >  >
>  > >  >
>  > >  > If you have Any idea  whay it is giving linking problem kindly let
> me
>  > > know.
>  > >  >
>  > >  > Thanks in advance,
>  > >  >
>  > >  > Regards,
>  > >  > Harsha
>  > >  >
>  > >  > --
>  > >  > To unsubscribe - send "unsubscribe" in the subject to qtopia-
>  > >  > interest-request@xxxxxxxxxxxxx
>  > >  >
>  > >
>

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 6 in thread

Hi Harsha,

You defined variables as global (not static) in your .h file. It gets
compiled into different .o files since you include your .h in
different compilation units. Now when you try to link those .o files,
the linker throws an error since there are multiple definitions of the
same global symbol.

If you don't want to share the variable, make it static in your header file.

Cheers,
Kiron.

On 12/14/06, harshavardhanreddy mandeepala <hvreddy1110@xxxxxxxxx> wrote:
> Hi,
> Thank to all for your replies,
> I tryed by removing extra underscore and also like follows
>
> #ifndef  __DRAWGRAPHS_H__
> #define  __DRAWGRAPHS_H__
>
> #endif
>
> But No improvement.
>
> About Namespcae usage i am sure that i am not using multiple names.
>
> I  really don't know why this problem is comming.
> Any other suggestions kindly let me know.
>
> Thanks to all once again,
>
> Regards,
> Harsha
>
>
>
>
>
> On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx> wrote:
> >
> > Hi Harsha!
> >
> > I guess you allready had a look, if those variables or structs are defined
> > elsewhere.
> >
> > So one thing, you could try is to use a namespace. Not a very beautiful way,
> > but it should be at least a workaround.
> >
> > hth!
> >
> > Bye,
> > Andy
> >
> >
> > "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on 13.12.2006
> > 14:02:40:
> >
> >
> >  > Hi Andy,
> >  > Thanks for your reply.
> >  >
> >  > In my main_processingImpl.h is like below.
> >  >
> >  > #ifndef MAINPROCESSINGFORMIMPL_H
> >  > #define MAINPROCESSINGFORMIMPL_H
> >  >
> >  > #include "Main_Processing.h"
> >  > #include <qevent.h>
> >  > #include <qwidget.h>
> >  >
> >  > //////// all variables and function declarations here.........
> >  >
> >  > #endif
> >  >
> >  >
> >  > And drawgraph.h is as below
> >  >
> >  > #ifndef _DRAWGRAPHS_H_
> >  > #define _DRAWGRAPHS_H__
> >  > #include "math.h"
> >  > #include "ANSAlgo.h"
> >  > #include <string.h>
> >  > #include <time.h>
> >  >
> >  > /****ECG Graph*****/
> >  >
> >  >    void DrawHGrid(float yaxis);
> >  >    void DrawVGrid(float xaxis);
> >  >    void DrawHLine(float yaxis);
> >  >
> >  >    void initializeECGgraph();
> >  >
> >  > //int InitGL_ecg(GLsizei width, GLsizei height);
> >  >    void DrawECG();
> >  >    void maintainRRmark();
> >  >    void render_ecg();
> >  >    void maintainECGgraph(int ecgdata);
> >  >         void ClearECG();
> >  >
> >  >    float ecg_y[400];
> >  >         float ecg_x[400];
> >  >    int rrmark[400];
> >  >         int ecg_fulllength;
> >  >         int ecg_countlength;
> >  >
> >  >
> >  > /****ANSindices Graph*****/
> >  >
> >  >    void render_ANSindices();
> >  >    void DrawANSindices();
> >  >    void initializeANSindicesgraph();
> >  >    void maintainANSindices(float balIndex,float symIndex,float
> >  > paraIndex,char *sTime);
> >  >    void ClearANSindices();
> >  >    void initializeANSindicesgraphParam();
> >  >
> >  >    typedef struct
> >  >    {
> >  >       char sTime[10];
> >  >       int grid;
> >  >    }STIME;
> >  >
> >  >    STIME *IndexTime[2];
> >  >    float *balIndexPoints[2];
> >  >    float *symIndexPoints[2];
> >  >    float *paraIndexPoints[2];
> >  >    int *markNotes[2];
> >  >
> >  >    STIME HistoryIndexTime[2000];
> >  >    float HistorybalIndexPoints[2000];
> >  >    float HistorysymIndexPoints[2000];
> >  >    float HistoryparaIndexPoints[2000];
> >  >    int HistorymarkNotes[2000];
> >  >
> >  >         float index_x[200];
> >  >         int ANSindex_HistoryCount;
> >  >         int ANSindex_HistoryFull;
> >  >    int ANSindex_CurrentDisplayPoint;
> >  >    int ANSindex_firlen;
> >  >    int ANSindex_seclen;
> >  >
> >  > /****balANS Graph*****/
> >  >    void initializebalANSgraph();
> >  >    void render_balANS();
> >  >    void ClearbalANS();
> >  >
> >  > /****StaticbalANS Graph*****/
> >  >    void initializeStaticbalANSgraph();
> >  >    void render_StaticbalANS();
> >  >    void ClearStaticbalANS();
> >  >
> >  >    int makeRasterFont();
> >  >    void printString(char *str);
> >  >    int checkTimeInterval(char *strnewtime);
> >  >    void initTimeInterval();
> >  >
> >  >    time_t t_newtime;
> >  >    time_t t_oldtime;
> >  >
> >  >    struct tm tm_newtime;
> >  >    struct tm tm_oldtime;
> >  >
> >  > #endif
> >  >
> >  >
> >  > In my  Main_ProcessingImpl.cpp i included
> >  > #include "drawgraphs.h"
> >  >
> >  > Thats all.
> >  >
> >  > I called one of the function from here which is defined in drawgraphs.cpp
> >  >
> >  > But it is giving linking error for all the variables which are
> >  > declared in drawgraphs.h
> >  >
> >  > as mentioned in previous message.
> >  >
> >  > If you have any suggestions kindly let me know.
> >  >
> >  > Thanks
> >  >
> >  > Regards,
> >  > Harsha
> >  >
> >  >
> >  >
> >  >
> >  >
> >  >
> >  > On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx>
> > wrote:
> >  > >
> >  > > Hi!
> >  > >
> >  > > You could try some sort of "include guard"
> >  > >
> >  > > in file drawgraphs.h at the very beginning something like:
> >  > >
> >  > > #ifndef DRAWGRAPHS_H
> >  > > #define DRAWGRAPHS_H
> >  > >
> >  > > and at the end of the file as last line:
> >  > > #endif // DRAWGRAPHS_H
> >  > >
> >  > > So the multiple definitions should be avoided.
> >  > >
> >  > > hth!
> >  > >
> >  > > Bye,
> >  > > Andy
> >  > >
> >  > > "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on
> > 13.12.2006
> >  > > 13:37:18:
> >  > >
> >  > >
> >  > >  > Hi All,
> >  > >  > I am using qt-2.3.10 and qtopia-2.1.1.
> >  > >  > In my application after make it is giving following linker error
> > message.
> >  > >  >
> >  > >  >
> > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x20):
> >  > > multiple
> >  > >  > definition of `tm_oldtime'
> >  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x0): first
> >  > > defined here
> >  > >  >
> > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x60):
> >  > > multiple
> >  > >  > definition of `tm_newtime'
> >  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x40): first
> >  > > defined here
> >  > >  >
> > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x8c):
> >  > > multiple
> >  > >  > definition of `t_oldtime'
> >  > >  >
> >  > >  > But actually  tm_oldtime is only declared  in drawgraphs.h file and
> >  > >  > used only in drawgraphs.cpp file.
> >  > >  >
> >  > >  > I am inluding drawgraphs.h file in Main_ProcessingImpl.h file.
> >  > >  > Similar type of error messages are  fallowed.
> >  > >  >
> >  > >  >
> >  > >  > If you have Any idea  whay it is giving linking problem kindly let
> > me
> >  > > know.
> >  > >  >
> >  > >  > Thanks in advance,
> >  > >  >
> >  > >  > Regards,
> >  > >  > Harsha
> >  > >  >
> >  > >  > --
> >  > >  > To unsubscribe - send "unsubscribe" in the subject to qtopia-
> >  > >  > interest-request@xxxxxxxxxxxxx
> >  > >  >
> >  > >
> >
>
> To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx
>
>

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx


Message 7 in thread

Hi Kiron,

Thanks for your help.

Now it started working.

Regards,
Harsha

On 12/14/06, Kiron V <kironv@xxxxxxxxx> wrote:
> Hi Harsha,
>
> You defined variables as global (not static) in your .h file. It gets
> compiled into different .o files since you include your .h in
> different compilation units. Now when you try to link those .o files,
> the linker throws an error since there are multiple definitions of the
> same global symbol.
>
> If you don't want to share the variable, make it static in your header file.
>
> Cheers,
> Kiron.
>
> On 12/14/06, harshavardhanreddy mandeepala <hvreddy1110@xxxxxxxxx> wrote:
> > Hi,
> > Thank to all for your replies,
> > I tryed by removing extra underscore and also like follows
> >
> > #ifndef  __DRAWGRAPHS_H__
> > #define  __DRAWGRAPHS_H__
> >
> > #endif
> >
> > But No improvement.
> >
> > About Namespcae usage i am sure that i am not using multiple names.
> >
> > I  really don't know why this problem is comming.
> > Any other suggestions kindly let me know.
> >
> > Thanks to all once again,
> >
> > Regards,
> > Harsha
> >
> >
> >
> >
> >
> > On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx> wrote:
> > >
> > > Hi Harsha!
> > >
> > > I guess you allready had a look, if those variables or structs are defined
> > > elsewhere.
> > >
> > > So one thing, you could try is to use a namespace. Not a very beautiful way,
> > > but it should be at least a workaround.
> > >
> > > hth!
> > >
> > > Bye,
> > > Andy
> > >
> > >
> > > "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on 13.12.2006
> > > 14:02:40:
> > >
> > >
> > >  > Hi Andy,
> > >  > Thanks for your reply.
> > >  >
> > >  > In my main_processingImpl.h is like below.
> > >  >
> > >  > #ifndef MAINPROCESSINGFORMIMPL_H
> > >  > #define MAINPROCESSINGFORMIMPL_H
> > >  >
> > >  > #include "Main_Processing.h"
> > >  > #include <qevent.h>
> > >  > #include <qwidget.h>
> > >  >
> > >  > //////// all variables and function declarations here.........
> > >  >
> > >  > #endif
> > >  >
> > >  >
> > >  > And drawgraph.h is as below
> > >  >
> > >  > #ifndef _DRAWGRAPHS_H_
> > >  > #define _DRAWGRAPHS_H__
> > >  > #include "math.h"
> > >  > #include "ANSAlgo.h"
> > >  > #include <string.h>
> > >  > #include <time.h>
> > >  >
> > >  > /****ECG Graph*****/
> > >  >
> > >  >    void DrawHGrid(float yaxis);
> > >  >    void DrawVGrid(float xaxis);
> > >  >    void DrawHLine(float yaxis);
> > >  >
> > >  >    void initializeECGgraph();
> > >  >
> > >  > //int InitGL_ecg(GLsizei width, GLsizei height);
> > >  >    void DrawECG();
> > >  >    void maintainRRmark();
> > >  >    void render_ecg();
> > >  >    void maintainECGgraph(int ecgdata);
> > >  >         void ClearECG();
> > >  >
> > >  >    float ecg_y[400];
> > >  >         float ecg_x[400];
> > >  >    int rrmark[400];
> > >  >         int ecg_fulllength;
> > >  >         int ecg_countlength;
> > >  >
> > >  >
> > >  > /****ANSindices Graph*****/
> > >  >
> > >  >    void render_ANSindices();
> > >  >    void DrawANSindices();
> > >  >    void initializeANSindicesgraph();
> > >  >    void maintainANSindices(float balIndex,float symIndex,float
> > >  > paraIndex,char *sTime);
> > >  >    void ClearANSindices();
> > >  >    void initializeANSindicesgraphParam();
> > >  >
> > >  >    typedef struct
> > >  >    {
> > >  >       char sTime[10];
> > >  >       int grid;
> > >  >    }STIME;
> > >  >
> > >  >    STIME *IndexTime[2];
> > >  >    float *balIndexPoints[2];
> > >  >    float *symIndexPoints[2];
> > >  >    float *paraIndexPoints[2];
> > >  >    int *markNotes[2];
> > >  >
> > >  >    STIME HistoryIndexTime[2000];
> > >  >    float HistorybalIndexPoints[2000];
> > >  >    float HistorysymIndexPoints[2000];
> > >  >    float HistoryparaIndexPoints[2000];
> > >  >    int HistorymarkNotes[2000];
> > >  >
> > >  >         float index_x[200];
> > >  >         int ANSindex_HistoryCount;
> > >  >         int ANSindex_HistoryFull;
> > >  >    int ANSindex_CurrentDisplayPoint;
> > >  >    int ANSindex_firlen;
> > >  >    int ANSindex_seclen;
> > >  >
> > >  > /****balANS Graph*****/
> > >  >    void initializebalANSgraph();
> > >  >    void render_balANS();
> > >  >    void ClearbalANS();
> > >  >
> > >  > /****StaticbalANS Graph*****/
> > >  >    void initializeStaticbalANSgraph();
> > >  >    void render_StaticbalANS();
> > >  >    void ClearStaticbalANS();
> > >  >
> > >  >    int makeRasterFont();
> > >  >    void printString(char *str);
> > >  >    int checkTimeInterval(char *strnewtime);
> > >  >    void initTimeInterval();
> > >  >
> > >  >    time_t t_newtime;
> > >  >    time_t t_oldtime;
> > >  >
> > >  >    struct tm tm_newtime;
> > >  >    struct tm tm_oldtime;
> > >  >
> > >  > #endif
> > >  >
> > >  >
> > >  > In my  Main_ProcessingImpl.cpp i included
> > >  > #include "drawgraphs.h"
> > >  >
> > >  > Thats all.
> > >  >
> > >  > I called one of the function from here which is defined in drawgraphs.cpp
> > >  >
> > >  > But it is giving linking error for all the variables which are
> > >  > declared in drawgraphs.h
> > >  >
> > >  > as mentioned in previous message.
> > >  >
> > >  > If you have any suggestions kindly let me know.
> > >  >
> > >  > Thanks
> > >  >
> > >  > Regards,
> > >  > Harsha
> > >  >
> > >  >
> > >  >
> > >  >
> > >  >
> > >  >
> > >  > On 12/13/06, andreas.sumper@xxxxxxxxxxxx <andreas.sumper@xxxxxxxxxxxx>
> > > wrote:
> > >  > >
> > >  > > Hi!
> > >  > >
> > >  > > You could try some sort of "include guard"
> > >  > >
> > >  > > in file drawgraphs.h at the very beginning something like:
> > >  > >
> > >  > > #ifndef DRAWGRAPHS_H
> > >  > > #define DRAWGRAPHS_H
> > >  > >
> > >  > > and at the end of the file as last line:
> > >  > > #endif // DRAWGRAPHS_H
> > >  > >
> > >  > > So the multiple definitions should be avoided.
> > >  > >
> > >  > > hth!
> > >  > >
> > >  > > Bye,
> > >  > > Andy
> > >  > >
> > >  > > "harshavardhanreddy mandeepala" <hvreddy1110@xxxxxxxxx> wrote on
> > > 13.12.2006
> > >  > > 13:37:18:
> > >  > >
> > >  > >
> > >  > >  > Hi All,
> > >  > >  > I am using qt-2.3.10 and qtopia-2.1.1.
> > >  > >  > In my application after make it is giving following linker error
> > > message.
> > >  > >  >
> > >  > >  >
> > > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x20):
> > >  > > multiple
> > >  > >  > definition of `tm_oldtime'
> > >  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x0): first
> > >  > > defined here
> > >  > >  >
> > > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x60):
> > >  > > multiple
> > >  > >  > definition of `tm_newtime'
> > >  > >  > .obj/release-shared/drawgraphs.o:(.bss+0x40): first
> > >  > > defined here
> > >  > >  >
> > > .obj/release-shared/Main_ProcessingImpl.o:(.bss+0x8c):
> > >  > > multiple
> > >  > >  > definition of `t_oldtime'
> > >  > >  >
> > >  > >  > But actually  tm_oldtime is only declared  in drawgraphs.h file and
> > >  > >  > used only in drawgraphs.cpp file.
> > >  > >  >
> > >  > >  > I am inluding drawgraphs.h file in Main_ProcessingImpl.h file.
> > >  > >  > Similar type of error messages are  fallowed.
> > >  > >  >
> > >  > >  >
> > >  > >  > If you have Any idea  whay it is giving linking problem kindly let
> > > me
> > >  > > know.
> > >  > >  >
> > >  > >  > Thanks in advance,
> > >  > >  >
> > >  > >  > Regards,
> > >  > >  > Harsha
> > >  > >  >
> > >  > >  > --
> > >  > >  > To unsubscribe - send "unsubscribe" in the subject to qtopia-
> > >  > >  > interest-request@xxxxxxxxxxxxx
> > >  > >  >
> > >  > >
> > >
> >
> > To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx
> >
> >
>

To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx