Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Error in my code?

  1. Dec 9, 2015 #1
    I have received this error :
    Code (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 :
    Code (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: Dec 9, 2015
  2. jcsd
  3. Dec 9, 2015 #2

    jedishrfu

    Staff: Mentor

    WHat command are you using to run the code?
     
  4. Dec 9, 2015 #3
    I am using gfortran in macbook air version 10.9.5
     
  5. Dec 9, 2015 #4

    DrClaude

    User Avatar

    Staff: Mentor

    Could you show exactly the compiling command? The problem might be with your installation of gcc.
     
  6. Dec 9, 2015 #5
    sigmat-no-air:desktop amany$gfortran exercise2.f90
     
  7. Dec 9, 2015 #6

    DrClaude

    User Avatar

    Staff: Mentor

    Then gfortran is not installed properly.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Error in my code?
  1. Error in code (Replies: 4)

Loading...