My all codes are not running which were running earlier in c++

Question:

Replit Profile: https://replit.com/@akashparab2

Welcome to the community! Could you please give more details as to what your problem is, your code, and the bug you are encountering? It would help us help you.

(i mean, not me. I have no idea how to code in c++)

error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:10: main] Error 1
exit status 2

1 Like

Can you provide the link to the Repl?

I get this after running the Repl called CPlusPlus:

I’m assuming this is because of the lack of a hashtag in line one of your CharDataType.cpp file. Change include<iostream> to #include <iostream>.

For your linker issue, this is due to the fact that both files have a main() function. Rename the function in CharDataType.cpp to something else.

3 Likes

error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:10: main] Error 1
exit status 2

Sorry, I guess I got the wrong one. The same thing applies though, because you have multiple files each including a main function. I’d highly recommend creating a Repl per each project/file you create because the Run button seems to automatically link all files together regardless if they are actually related. Either one of those should solve the problem.

1 Like