public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Claudiu BRASOVEAN <claudiu@rdscj.ro>
To: gcc-help@gcc.gnu.org
Subject: need help
Date: Tue, 02 May 2000 09:31:00 -0000	[thread overview]
Message-ID: <390F02F0.F265AF25@rdscj.ro> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

Hello....
Please excuse my childish question but I am new in the field and I am
lost due to a very simple problem.
Here is my problem:
Main program:
//main.c
#include <stdio.h>
#include "funct.h"
void main(void){

printf("Calling external function\n");

foo(3);

}
////////////////////
//funct.h
.....
extern void foo(int);
.....
////////////////////
//funct.c
#include <stdio.h>
#include "funct.h"
..........
void foo(int x){printf("My parameter was:%d\n",x);};
..................
Here is what i get from gcc (in fact is ld, isn't it?)
/tmp/ccahK6eu1.o: In function `main':
/tmp/ccahK6eu1.o(.text+0x29): undefined reference to `foo'
I do not understand why ld can not resolve symbol. The compiling phase
works fine
I do have a SuSE 6.3 Linux distribution whith gcc-2.7.2.3-63 on it.
Thank you in advance.
 


             reply	other threads:[~2000-05-02  9:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02  9:31 Claudiu BRASOVEAN [this message]
2000-05-02 10:00 ` llewelly
  -- strict thread matches above, loose matches on Subject: below --
2007-06-07 12:23 ASHA GOWDA
2007-06-07 14:53 ` Ian Lance Taylor
2005-03-21  8:54 arul kumaran
2005-02-08 12:19 Vijayalakshmic
2004-10-11 17:50 Need Help Sriharsha Vedurmudi
2004-10-13  7:16 ` Muthukumar Ratty
2003-10-01  5:23 need help cro
2003-10-01  6:10 ` Jeffrey Holle
2003-09-26 11:28 Eitan
2003-09-26 11:34 ` Jon Beniston
2003-07-08 16:16 V  Robert
2003-07-09 18:42 ` LLeweLLyn Reese
2002-08-19 10:07 Kitti Kittirutsunetorn
2002-08-19 12:02 ` bjorn rohde jensen
2002-08-19 14:56   ` Oscar Fuentes
2002-08-19 15:29     ` bjorn rohde jensen
2001-07-01 22:30 Need help Martin Kalen
2001-07-01 14:42 Jules FOSSO
2001-07-01 22:02 ` Parameshwari B.
1999-11-05 13:05 Need Help Powell, Sandy
1999-11-30 23:28 ` Powell, Sandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=390F02F0.F265AF25@rdscj.ro \
    --to=claudiu@rdscj.ro \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).