Our forums have moved! Please go to http://forums.accellera.org for the new forums. The forums you see here will remain open for browsing, but are no longer open to new posts.
KMLM List
View email archives for the history of this mailing list.
|
|
|
|
systemc-forum - Re: [Systemc-forum] Error executing link.exe
|
Message Thread:
Previous |
Next
|
- To: Asif CN <asifcn@xxxxxxxxx>
- From: Martin Janssen <Martin.Janssen@xxxxxxxxxxxx>
- Date: Wed, 22 May 2002 09:31:17 +0200
- Cc: systemc-forum@xxxxxxxxxxxxxxxxxxx
- Send Email to systemc-forum@osci.kavi.com:
- Send new message
- Reply to this message
|
Hi Asif,
You forgot to declare the function inline, i.e.
// pkg1.h
#ifndef PKG1_H
#define PKG1_H
#include "systemc.h"
inline
sc_logic and2(sc_logic I0,sc_logic I1)
{
return (I0 & I1);
}
#endif
Martin
-oo-
Asif CN wrote:
Hi all,
i was trying to make a "header file" in correspondence to a PACKAGE in
VHDL. just take a basic componet like "AND2",and then i used the AND2
fuction implemented in the header.
==========================
// pkg1.h
#ifndef PKG1_H
#define PKG1_H
#include "systemc.h"
sc_logic and2(sc_logic I0,sc_logic I1);
sc_logic and2(sc_logic I0,sc_logic I1)
{
return (I0 & I1);
}
#endif
========================
but i couldn't create an exe file,as it gives some "LINK ERRORS" given
below...
=====================
Compiling...
annd2.cpp
annd2_stim.cpp
Linking...
annd2_stim.obj : error LNK2005: "class sc_logic __cdecl and2(class
sc_logic,class sc_logic)" (?and2@@YA?AVsc_logic@@V1@0@Z
<mailto:?and2@@YA?AVsc_logic@@V1@0@Z>) already defined in annd2.obj
Debug/ex1.exe : fatal error LNK1169: one or more multiply defined
symbols found
Error executing link.exe.
ex1.exe - 2 error(s), 0 warning(s)
==========================
what is the cause of this?any idea?
i'm using SystemC2.0 under VC++6 on winNT.
i'm attaching all the files(ex1.zip) of the session for your reference.
can anybody please help me on this?
Thanks in advance
Regards
Asif
------------------------------------------------------------------------
Do You Yahoo!?
LAUNCH <http://rd.yahoo.com/welcome/*http://launch.yahoo.com> - Your
Yahoo! Music Experience
--
---------------------------------------------------
Martin.Janssen@xxxxxxxxxxxx
System Level Design Tools Synopsys GmbH
Kaiserstrasse 100
tel: +49 2407 9558 65 D-52134 Herzogenrath
fax: +49 2407 9558 44 Germany
---------------------------------------------------
|
|
|
Mail converted by the most-excellent MHonArc 2.6.10
|