I have a library project which includes a object (.o) file. I have the following post build command to make sure the file is included in the build:
ar -r libProject.a AdHocObject.o
However, that means I have to manually copy my AdHocObject.o file in Debug and Release, and I can never clean the project, or I need to start over and copy AdHocObject.o in Debug and Release.
This becomes even more a hassle when I have a second project which uses the library (as an Include) and rebuilds it, making sure AdHocObject.o is erased first.
I'm a bit lost here. I'm thinking there could be various ways, but I can't find them. I could:
Are any of these actions possible, and if more than one, what is the recommended approach?
I got it, I just needed to point to the right place, put the o file with the sources and adjust the post build command thus:
ar -r libProject.a ..\AdHocObject.o