-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Description
Recently, while working on a C++ project, I discovered a problem. My specific approach is that for each cpp file in the project, I will generate a corresponding IR file, then process this IR file to generate a new IR file, and finally generate an obj file. In this way, by linking all the OBJs, I can generate an exe file.
However, when I linked obj to generate an exe file, due to the fact that the IR file I generated contained some implementations of inline functions and library functions, it would lead to duplicate definitions, resulting in the failure of generating the exe file. I tried many methods, but none of them could retain only the function implementations I wrote myself during the IR file generation stage, and only keep the declarations of the others.