The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Error in issuing a make and make install ahjiefreak Linux 1 03-12-2008 01:32 AM
Error while running C++ make file hram High Level Programming 1 10-18-2007 06:28 PM
Error when running make shashidhara_01 High Level Programming 1 02-02-2007 06:35 PM
how to make percentage of a running script? jimmbp Shell Programming and Scripting 1 01-31-2006 02:41 PM
Solaris 9: make: Fatal error:Command failed for target eldiego UNIX for Dummies Questions & Answers 2 10-28-2005 03:11 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2003
nattynatty nattynatty is offline
Registered User
  
 

Join Date: Apr 2002
Posts: 31
Unhappy Error when running the make command

Hi,
Not really sure whether this question should go to this forum but am giving it a shot.

I have compiled a simple C program test.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int a;
int test()
{
a=a+1;
return a;
}

When I run a make command, I get this:

--- This is the command -----
$ /usr/ccs/bin/make -f demo_rdbms.mk extproc_nocallback SHARED_LIBNAME=test.so OBJS=test.o
-----------------------------------

-----Output ---------------------

/usr/ccs/bin/ld -G -z text -L/u01/app/oracle/product/9.0.1/lib -R/u01/app/oracle
/product/9.0.1/lib -o test.so test.o
Text relocation remains referenced
against symbol offset in file
a 0x4 test.o
a 0x8 test.o
a 0xc test.o
a 0x10 test.o
a 0x20 test.o
a 0x24 test.o
ld: fatal: relocations remain against allocatable but non-writable sections
*** Error code 1
make: Fatal error: Command failed for target `extproc_nocallback'

------------------------------------

I am using Sun Solaris 2.8.

Can anyone pl suggest what might be wrong.
Thanx
  #2 (permalink)  
Old 03-12-2003
norsk hedensk norsk hedensk is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
you need to compile it with the 'cc' command.
so youd type
cc test.c

however iwould suggest naming the program something other than test, because there already exists a command 'test'. you can keep the name as test if youd like, but you will need to make sure you have the ./ infront of the command ./test. but if you just use the command cc test.c it is ok, the binary will be there as a.out and not test, unless you specify it.
  #3 (permalink)  
Old 03-25-2003
trido trido is offline
Registered User
  
 

Join Date: Oct 2002
Posts: 4
test() is not an entry point for the executable.

you must call it main() if you intend to run it as an executable. otherwise, include the header file for test (test.h) in your main program and call the function from there.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0