Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

image text in transcribed

#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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago

Question

2. Define the grand narrative.

Answered: 1 week ago

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago