Error in My Code: Undefined Symbols for x86_64

  • Thread starter Thread starter Amany Gouda
  • Start date Start date
  • Tags Tags
    Code Error
Click For Summary

Discussion Overview

The discussion revolves around an error encountered while compiling a Fortran program using gfortran on a MacBook Air. The error message indicates undefined symbols for the x86_64 architecture, prompting participants to explore potential causes related to the code and the compilation process.

Discussion Character

  • Technical explanation, Debate/contested, Homework-related

Main Points Raised

  • One participant presents an error message related to undefined symbols when compiling a Fortran program.
  • Another participant asks for the command used to run the code, suggesting that the issue may be related to the compilation command.
  • A participant mentions their use of gfortran on a specific version of macOS, indicating a potential compatibility issue.
  • There is a request for the exact compiling command to diagnose the problem further, with a suggestion that the issue might stem from the installation of gcc.
  • One participant concludes that gfortran is not installed properly based on the provided information.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the exact cause of the error, with multiple viewpoints regarding the installation and command usage of gfortran. The discussion remains unresolved.

Contextual Notes

The discussion does not clarify the specific installation issues or the exact nature of the undefined symbols error, leaving some assumptions about the environment and setup unaddressed.

Amany Gouda
Messages
29
Reaction score
0
I have received this error :
Fortran:
Undefined symbols for architecture x86_64:
"start", referenced from:

-u command line option

(maybe you meant: __gfortrani_library_start)

ld: symbol(s) not found for architecture x86_64

collect2: error: ld returned 1 exit status
what is this mean??

the code is :
Fortran:
program   exercise2

  integer:: i,j
  real,dimension (5,5)::A

  open(20,file='A.txt',status='old')  do i=1,5
  read(*,*)(a(i,j),j=1,5)
  end do

  do i=1,5
  write(20,*)(a(i,j),j=1,5)
  end do

close(20)

  end program exercise2
 
Last edited by a moderator:
Technology news on Phys.org
WHat command are you using to run the code?
 
jedishrfu said:
WHat command are you using to run the code?
I am using gfortran in macbook air version 10.9.5
 
Amany Gouda said:
I am using gfortran in macbook air version 10.9.5
Could you show exactly the compiling command? The problem might be with your installation of gcc.
 
DrClaude said:
compiling command

sigmat-no-air:desktop amany$gfortran exercise2.f90
 
Then gfortran is not installed properly.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
7
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
7K
  • · Replies 20 ·
Replies
20
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K