Question: I've been trying to compile and link these 2 cpp files plus I have a header file also. For some reason I keep getting this

I've been trying to compile and link these 2 cpp files plus I have a header file also. For some reason I keep getting this error message and to tell you the truth, I have no idea where the problem is and any search I've done so far shows no answers. Some help would be greatly appreciated. I attached the two source codes.

Undefined symbols for architecture x86_64:

"_edata", referenced from:

_main in lab1a-7fc4d3.o

"_end", referenced from:

_main in lab1a-7fc4d3.o

"_etext", referenced from:

_main in lab1a-7fc4d3.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've been trying to compile and link these 2 cpp files plus

I have a header file also. For some reason I keep getting

#include extern int gcount; void swapper (int & fnum, int &snum) /in order to perform I/0 */ 3 4 5 /* declaration of the variable gcount* static int cflag=0; int temp; output the addresses of the static local variable of swapper cflag &c flag); 10 11 printf(" &Cflag = \t %8x ", 12 13 * output the addresses of the local variables and parameters of swapper fnum, snum, and temp- \t printf (" &fnum = \t %8x &snum = \t %8x &temp %8x ", &fnum, &snum &temp) ; , 15 16 17 18 19Y 20 21 cflag+ if (fnum> snum) /I to count the number of times this function has been called so far gcount ++; temp = fnum; fnum = snum; snum = temp ; 23 24 25 26 printf (" so far, function swapper has been called :\t times" , cflag); 28 29 30 31 32 int express (int num1, int num2) output the addresses of the parameters of function express, num1 and num2 &num2); printf(" express: \t &num1-\t return (2 num1 -num2); %8x express: \t &num2 \t %8x", &nun1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!