pyrochild Posted March 18, 2008 Posted March 18, 2008 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. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it!
Rick Brewster Posted March 18, 2008 Posted March 18, 2008 Try $TargetPath instead. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
pyrochild Posted March 18, 2008 Author Posted March 18, 2008 Worked. Thanks. Still baffles me as to why it wouldn't work the other way... Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it!
Rick Brewster Posted March 18, 2008 Posted March 18, 2008 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 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
pyrochild Posted March 18, 2008 Author Posted March 18, 2008 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 Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it!
aphillips Posted April 1, 2008 Posted April 1, 2008 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. Quote
pyrochild Posted April 1, 2008 Author Posted April 1, 2008 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. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.