Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Deleting the static library before generating it?

(1/4) > >>

oBFusCATed:
Here is the description of the problem:
Currently I have two build systems working on the same files - one custom and the one inside C::B.
The custom build system generates .obj files and C::B generates .o files.
This is causes problems, when I first build the project with the custom system and then change something in a source file and hit Build in C::B.
The problem is that C::B doesn't delete the .a file but just adds (replaces files if the names match) to the archive.
So the result of the build inside C::B is that I'm getting an .a file which contains two files:
  myfile.obj (the old file)
  myfile.o (the new file)
and when this archive is used for linking the old file is used again and the new file is ignored, which is not correct.

Is it possible to make the build system inside C::B to delete the .a file?
I've looked at the options of ar, but there is no option to wipe the file before creating it.

If it is possible, what should be modified?

Freem:
Is not it possible to use pre-build instructions to remove it?

oBFusCATed:

--- Quote from: Freem on September 27, 2012, 01:50:10 pm ---Is not it possible to use pre-build instructions to remove it?

--- End quote ---
No because it won't be automatic/automagic/just works.
This is not a topic how to workaround the problem, but about how to fix it.  :P

Freem:
Ho... sorry for inconvenience.

MortenMacFly:
I would say its an issue with the archivar. Check, if GCC's "ar" has something like an option for that. How would you do that on the command line?

Navigation

[0] Message Index

[#] Next page

Go to full version