Hi Andreas,

Thanks for the prompt reply. I tried both the things. I still get the same 
error at linking. And when I use the -v option all I get is this in output:

scons -v CC=gcc CXX=g++ build/X86/gem5.debug
SCons by Steven Knight et al.:
    script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
    engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
    engine path: ['/usr/lib/scons/SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 
The SCons Foundation


Please advise! And thanks for the wishes...

Regards,
Hasan IJaz



________________________________
 From: Andreas Hansson <[email protected]>
To: Hasan Ijaz <[email protected]>; gem5 users mailing list 
<[email protected]> 
Sent: Wednesday, April 17, 2013 5:04 PM
Subject: Re: [gem5-users] Error while Linking static Library with GEM5
 


Hi Hasan,

What you have done looks absolutely right, with the exception that you should 
not inlude "lib" in the library name. Thus, LIBS = ['fw']. You can always run 
scons with "-v" and have a look at the linking command line to ensure it is 
correct.

Good luck.

Andreas
From: Hasan Ijaz <[email protected]>
Reply-To: Hasan Ijaz <[email protected]>, gem5 users mailing list 
<[email protected]>
Date: Wednesday, 17 April 2013 06:54
To: "[email protected]" <[email protected]>
Subject: [gem5-users] Error while Linking static Library with GEM5


Hi,

        I am trying to compile a software framework with GEM5. I have compiled 
my code into a static library using make. After that I have added these lines 
to SContruct file:

# add the framework library path to the main environment
main.Append(CPPPATH = 
['/home/opensilicon/Codes/gem5-stable/src/dev/framework/include'])
main.Append(LIBPATH = ['/home/opensilicon/Codes/gem5-stable/src/dev'])
main.Append(LIBS = ['libfw'])

    I am calling functions from the library in the Disk_Image.cc file. It 
compiles successfully but during Linking I get the following error:

In function `SsdDiskImage':
/home/opensilicon/Codes/gem5-stable/build/X86/dev/disk_image.cc:63: undefined 
reference to `fw_init(unsigned char)'


Although this function compiles suceessfully and is in the lib. What am I 
missing?

Regards,
Hasan Ijaz

-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to