If your family composition changes between having been granted a PR visa and landing, you must report this to immigration and add the new family member to your application.
Once your family composition has changed before landing, your PR visa is rendered invalid. You should contact the visa office and inform them. You should send your visa back to them and they will re-issue it with your new family member added once you have added them. Keep in mind that should your wife be denied due to medical reasons or background checks, you will not be getting a new visa either.
If you have a visa issued to you as a single person and you get married and then use this visa to land as a PR the results would be some of the following: If you tell the immigration officer when you land that you have gotten married, they could stop you from landing and cancel your visa or they could allow you to land but bar you from ever sponsoring your wife. If you don't tell them, you will be committing misrepresentation and if you ever try to sponsor your wife , you could lose your PR and be deported as your misrepresentation comes to light or at the very least, you can never sponsor your wife.
The other option would be that you go and land as a single person on your visa. Return home and get married. Then return to Canada to sponsor your wife.
If you are not applying for PR by yourself but getting it as a dependent child of your parents, then it complicates things a bit more because by getting married, you risk losing your dependent child status. If that is the case, you should definitely not get married before landing.