E
E
efim232014-12-24 22:47:58
linux
efim23, 2014-12-24 22:47:58

What is the error when compiling assembler with gcc compiler?

This is the error that is thrown when compiling. Please help. Thank you.
I am sure that the code is working, it starts on a neighboring machine (

MacBook-Pro-Mac:~ mac$ gcc -m32 -nostartfiles /Users/mac/laba3.s -o laba3
Undefined symbols for architecture i386:
  "_main", referenced from:
     implicit entry/start for main executable
  "close", referenced from:
      _start in laba3-3001fc.o
      child_grep in laba3-3001fc.o
      child_cut in laba3-3001fc.o
      child_sort1 in laba3-3001fc.o
      child_uniq in laba3-3001fc.o
      child_sort2 in laba3-3001fc.o
      closefiles in laba3-3001fc.o
      ...
  "dup2", referenced from:
      child_grep in laba3-3001fc.o
      child_cut in laba3-3001fc.o
      child_sort1 in laba3-3001fc.o
      child_uniq in laba3-3001fc.o
      child_sort2 in laba3-3001fc.o
      child_awk in laba3-3001fc.o
      child_sort3 in laba3-3001fc.o
      ...
  "execvp", referenced from:
      child_grep in laba3-3001fc.o
      child_cut in laba3-3001fc.o
      child_sort1 in laba3-3001fc.o
      child_uniq in laba3-3001fc.o
      child_sort2 in laba3-3001fc.o
      child_awk in laba3-3001fc.o
      child_sort3 in laba3-3001fc.o
      ...
  "fork", referenced from:
      _start in laba3-3001fc.o
  "pipe", referenced from:
      _start in laba3-3001fc.o
  "wait", referenced from:
      _start in laba3-3001fc.o
      clean2 in laba3-3001fc.o
      closefiles in laba3-3001fc.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
m0rd, 2014-12-24
@efim23

Error in code :)

A
Armenian Radio, 2014-12-24
@gbg

Written in English in white - there are no characters in the i386 architecture. The next machine go 64 bit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question