Re: [Gems-users] Problem in static linking to ruby


Date: Sat, 26 Jun 2010 21:50:20 -0500
From: "Anup Holey" <holey003@xxxxxxx>
Subject: Re: [Gems-users] Problem in static linking to ruby
Can anyone guide me through this?
 
Thanks,
-Anup
 
----- Original Message -----
From: Anup Holey
Sent: Thursday, June 24, 2010 3:38 AM
Subject: [Gems-users] Problem in static linking to ruby

Hi,
 
I am trying to statically link a separate binary to ruby which is another simulator. I have changed the Makefile in gems-2.1/ruby/ for that purpose.
Call to this simulator happens from ruby/simics/commands.C file. I have included necessary header file in commands.C.
 
But it gives me error during compilation saying 'undefined reference to function_name'. I must be making some mistake.
I am not sure about compilation flow of ruby and how it exactly generated ruby.so. I want my library to be present in ruby.so.
 
This is the change I made in ruby/Makefile.
 
 $(BIN_DIR)/tester.exec: simics_api_dummy.c $(RUBY_OBJ) $(BIN_DIR)/created $(GENERATED_DIR)/generated
             @echo ""
             @echo "Linking tester binary ..."
             $(CC) -o $@ $(LDFLAGS) simics/simics_api_dummy.c -L$(LIBRARY_PATH) -lname \
                     $(RUBY_OBJ)
             @echo "Made tester"
Actual binary name is libname.a. No changes otherwise. Original ruby compilation works fine.
 
I get the error on this command during make. What must be going wrong?
Is this the right place for linking my library?
 
Thanks and regards,
Anup
 


_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.

[← Prev in Thread] Current Thread [Next in Thread→]