What I'd recommend, and I had to do this for a project I was working on, you could have a few files of obj-c++ that provide both a C/C++ api and internally use obj-c code to trigger the doc flashing.
Essentially you create a standard C/C++ header file. In the code side you make the file a .m or .mm file.
This would then let you write the obj-c one liner in questions directly into a C/C++ function, and since the header file is in plain C/C++ it won't be a compiler error for the non .mm files in the project.
This of course assumes that compiling with a compiler (like GCC) that speaks both languages.
A simple and (tested) example of this approach would be:
TriggerBounce.h
void TriggerBounce(char * filepath);
TriggerBounce.m
#import <Cocoa/Cocoa.h>
void TriggerBounce(char * filepath) {
NSString *pathToFile = [NSString stringWithCString:filepath encoding:NSUTF8StringEncoding];
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"com.apple.DownloadFileFinished" object:pathToFile];
}