Jump to content

error PRJ0019: Post-build event failing with VC++ project


Recommended Posts

Ok, so I'm dabbling in C++ now.

I've set a post-build event in the C++ project:

copy "$(TargetFileName)" "%PROGRAMFILES%\Paint.NET\Effects"

This is the exact same post-build event I've used for C# Paint.NET plugin development.

But in C#, it works. In C++, I get "error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."

I've Googled this like hell, to absolutely no avail.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

There are 3 terms that have very specific meanings and which are used pedantically here: filename, directory, and path.

Filename: Bunnies.dll -- just the name of a file with no context as to "where" it is

Directory: c:\projects\Bunnies\bin\Debug -- just the absolute, canonical name of a dir/folder

Path: c:\projects\Bunnies\bin\Debug\Bunnies.dll -- filename with context as to which directory it's in

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I know all that junk, I just don't understand why it's not smart enough to run the command lines from the compile dir, whereas all the other compilers in VS are.

EDIT: I'm not going to be using C++ for plugin dev work anyways... It's far more work than C#, and the code is generally less readable.

I just wanted to be able to claim C++ experience for employment purposes ;)

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

  • 2 weeks later...

One tip. Looking in the BuildLog.htm file would have given you more information - eg "effect.dll - file not found".

And there is no reason to not always use the full path. I don't think it is specified what directory the compiler is run in. You were lucky with all the other languages you use, but may not be in the future.

Link to comment
Share on other sites

And there is no reason to not always use the full path.

I know, I know, I know *sigh*

I've since always used TargetPath when setting up build-events, regardless of language. Only reason I didn't before was I guess I skimmed the macro list too fast, maybe?

I didn't know about BuildLog.htm, though, so thanks.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...