error message

I copied a sketch from the library to operate a relay. Before the compiler even gets to the first line the error message stops it and says "exit status1
expected unqualified-id before id" I am vey new at this. Help please.

 // initialize digital pin LED_BUILTIN as an output./
int ledPin = 2;

// the setup function runs once when you press reset or power the board
void setup()
  pinmode(ledpin, output)

// the loop function runs over and over again forever
void loop()
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second

Try deleting the lone asterisk at the top.
Then your pinMode needs a semicolon, and OUTPUT should be in capitals

And LED_BUILTIN has not been set as an OUTPUT unless LED_BUILTIN is the same as ledpin.

What Arduino is this?

Uno. the sketch I copied from the library does not have the word builtin

LED_BUILTIN has a specific meaning.
An Uno has an LED on pin 13 although you may have connected one to pin 2. However, I am confused. This little program sets up pin 2 and then uses pin 13. Not good.

What is your plan?

am getting nowhere in a hurry. Now the message says it cannot find the file although it does compile without issue.

Post the message(s).
Post the code.

Otherwise, we're wasting time with guessing games.

The code is in the original post.

The code is in the original post.

The code in the original post was full of bugs. Did you fix them? If not, you are wasting our time. If you did, you should NOT have replaced the code in the first post. That is a sure way of being ignored in the future.

I fixed the code in the original post. I thought that not being able to find the file was not a problem with the code.

I fixed the code in the original post.

Ordinarily, that makes people that commented on errors in the original code look like idiots for pointing out errors that aren't there any more.

In this case, you are the one that looks like an idiot, since you did NOT fix the errors that were pointed out.

Do NOT edit post #1 ever again. Post changes to code in a new reply.

Please read reply #6.
As you may now have gathered, you should not edit the code in the original post.

I am appalled by such childish outbursts of name calling.
Please read the title / purpose of this forum at your free time and chill.

Here is an annotated compiler error output.

This error is identifying the * in the beginning of your sketch , the compiler expected something , but cannot tell what - hence “unqualified”

sketch_oct08a:4: error: expected unqualified-id before ‘int’
int ledPin = 2;
sketch_oct08a:4: error: expected constructor, destructor, or type conversion before ‘int’
/home/jim/Arduino/sketch_oct08a/sketch_oct08a.ino: In function ‘void setup()’:

this error pointed out the mismatch in ledPin and ledpin
language is case sensitive

sketch_oct08a:9: error: ‘ledpin’ was not declared in this scope

pinmode(ledpin, output)
this error just points out the incorrect name of the function pinMode
language is case sensitive

sketch_oct08a:9: error: ‘output’ was not declared in this scope
pinmode(ledpin, output)
again the ledpin and ledPin are identified as not matching

sketch_oct08a:9: error: ‘pinmode’ was not declared in this scope
pinmode(ledpin, output)
pinmode does not exist in your code , wrong API function name

sketch_oct08a:10: error: expected ‘;’ before ‘}’ token

This one the compiler sort-of messed-up it actually wants ; AFTER the token,
but the wrong parameter name “output” - capitals is to blame .

exit status 1

that is compiler "failed to compile " error message - generally useless

expected unqualified-id before ‘int’

Compiler error message are essential, do not always “speak English” and pinpoint the coding error.

You can actually read them from both directions - top to bottom or opposite.

You can fix the errors at random order , fixing the obvious one first.

Just remember - your objective is to compile the code , not to have clean slate on the first try.

It is the compiler’s job to help you clean it up!
Actually syntactic / typos error are cinch to fix, fixing the logic of the code is much harder.
Best of luck to you.