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]<mailto:[email protected]>>
Reply-To: Hasan Ijaz <[email protected]<mailto:[email protected]>>,
gem5 users mailing list <[email protected]<mailto:[email protected]>>
Date: Wednesday, 17 April 2013 06:54
To: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[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