Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the error C1083 cannot open compiler generated file 'somePath\someFile.cod" related to Whole Program Optimization?

When I build I find I'm getting errors about missing cod files. The compiler seems to be trying to link to a lib that had some flag set when it was built to output .cod files.

I don't see why the cod files are needed though to link, shouldn't the lib be enough?

Thanks

like image 456
Scott Langham Avatar asked Jul 12 '10 15:07

Scott Langham


2 Answers

Prevent .cod files from being produced by opening the project that produces the lib. Go to project settings, C++, Output Files, and switch assembler output off. (So that in the raw text of the vcproj file you get AssemblerOutput="0").

This appears to make the problem go away, but I'm still not sure why the linker was looking for .cod files in the first place.

like image 147
Scott Langham Avatar answered Nov 15 '22 05:11

Scott Langham


To enable creation of .cod/.asm files with assembly listings for some library, disable whole program optimization and link time code generation when building that library.

1) Project Properties - Configuration Properties - General - set "Whole Program Optimization" to "no whole program optimization"

2) c/c++ - optimization - set "Whole Program Optimization" to "No"

3) Librarian - set "Link time code generation" to "No"

like image 32
Kaspars Leinis Avatar answered Nov 15 '22 05:11

Kaspars Leinis