Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help to solve an error in build systemC code in VC++

Status
Not open for further replies.

chancelier

Junior Member level 1
Joined
Jan 26, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
tunisia
Activity points
1,433
error in build

Hi I am a newbee in VC++ and I am trying to run a systemc code.

This code compiles but when I try to build the project, the link fails and gives me this.

--------------------Configuration: revision - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "kernel32.lib"
Error executing link.exe.

revision.exe - 1 error(s), 0 warning(s)



what might be the problem?
 

Re: Need help to solve an error in build systemC code in VC+

you have not given the link options to link
kernel32.lib.

use the linker configuration options to link the named file.

srizbf
1stjune2010
 

Re: Need help to solve an error in build systemC code in VC+

please elaborate

specify me the steps one by one because i dont manage to understand what should i do.
 

Re: Need help to solve an error in build systemC code in VC+

first search where exactly (in which directory)the file named 'kernel32.lib' exists
in your system.

srizbf
1stjune2010
 

Re: Need help to solve an error in build systemC code in VC+

In VC++ IDE, go to tools/options menu and in the options dialog, select VC++ directories and add the directory where kernel32.lib is found. It can be a little different in different VC++ versions, but this is the basic idea.
 

Re: Need help to solve an error in build systemC code in VC+

thanks all for help

i did like u said numa and i got 2 errors now, but ithink i am on the right track.


--------------------Configuration: revision - Win32 Debug--------------------
Linking...
systemc.lib(sc_uint_base.obj) : error LNK2001: unresolved external symbol "unsigned __int64 const (* sc_dt::mask_int)[64]" (?mask_int@sc_dt@@3QAY0EA@$$CB_KA)
Debug/revision.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

revision.exe - 2 error(s), 0 warning(s)



what does "unresolved external" mean?
please help me on this
 

Re: Need help to solve an error in build systemC code in VC+

OK, I guess you are on the right track. Now the problem is that the linker can't locate systemc.lib. Please add path to systemc.lib in options dialog as you did with kernel32.lib. This should help.

Unresolved external means the linker couldn't find the definition for a function that is declared/used in the code. When the compiler see a function used in a c file, it will assume that the function definition may be existing in some other C file or library and continues compilation as if nothing happened. When the linker tries to link individual object files, it will see that the particular function is used and will try to locate it in other object files or library files. If linker can not find the function definition, it will abort linking further with error "unresolved external".

here in you case you might have used some functions defined in systemc.lib, but since linker can't locate systemc.lib it cant figure out the function definition.

Long explanation, but hope this helps :D
 

Re: Need help to solve an error in build systemC code in VC+

i did like u said

the directory of systemc.lib is

C:\systemc-2.0.1\msvc60\systemc\Debug

i added it to library files directory in tools>> options>>directories


but that does not wok ,i am getting same error when building
 

Re: Need help to solve an error in build systemC code in VC+

Go to project-> properties menu, in the dialog navigate to Linker and add systemc.lib in additional dependencies field. See if this helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top