user16688: How do I rectify this error?
Clearly it says there is some error in the library, so how do I correct it?
C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:1: error: expected unqualified-id before 'if'

user3917: As you haven't shown the code that produces the error when it's compiled, I can't say for sure what the problem is.  However, here are links to three instances of the same error:
• error: expected unqualified-id before 'if' on stackoverflow
• Arduino: error: expected unqualified-id before 'if' (using ping sensor), also on stackoverflow
• error: expected unqualified-id before 'if' on arduino.cc.
In each case, the problem was due to executable code (as opposed to declarations) appearing outside of a function.  You may have put some executable statements outside of loop() or setup(), etc.

16688: <p>How do I rectify this error?
Clearly it says there is some error in the library, so how do I correct it?</p>

<p>C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:1: error: expected unqualified-id before 'if'</p>
 3917: <p>As you haven't shown the code that produces the error when it's compiled, I can't say for sure what the problem is.  However, here are links to three instances of the same error:</p>

<p>• <em><a href="https://stackoverflow.com/q/8690446">error: expected unqualified-id before 'if'</a></em> on stackoverflow</p>

<p>• <em><a href="https://stackoverflow.com/q/14538210">Arduino: error: expected unqualified-id before 'if' (using ping sensor)</a></em>, also on stackoverflow</p>

<p>• <em><a href="http://forum.arduino.cc/index.php?topic=26465.0" rel="nofollow noreferrer">error: expected unqualified-id before 'if'</a></em> on arduino.cc.</p>

<p>In each case, the problem was due to executable code (as opposed to declarations) appearing outside of a function.  You may have put some executable statements outside of <code>loop()</code> or <code>setup()</code>, etc.</p>
