- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I compile a project with /Zl switch added to the command line and in the resulting obj/lib files I still get strings:
-defaultlib:"uuid.lib" -defaultlib:"uuid.lib" -defaultlib:"libirc"
That's right, uuid.lib is listed twice for each object file as if once wouldn't be enough.
Why is the /Zl switch interpreted half-way only? When I say "ignore default libraries" I mean all of them!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jennifer, I am sorry but MSVC 2005 cl.exe doing the same is a poor excuse unless you meant to say that it is a compatibility hack.
I am still curious why does the compiler emit uuid.lib twice? Isn't once enough?
I have seen duplicate library names emitted into object files several times with ICC, sometimes just one name, sometimes all library names are repeated. Fixing it (if it is an error on compiler side) could perhaps improve compile and link speed a bit for those extra large projects with thousands of files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ICL has to match CL on this in order to do mix-match linking.
After talking with experts on this, the uuid.lib is not inserted by the compiler. It's likely in the VC header files twice like "#pragma comment(lib:uuid.lib)". so it's in .obj twice. As my testcase, it has "#include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, we are getting somewhere.
Could you please ask the experts why the compiler does not coalesce multiple pragmas which reference the same library file?
I have tested it and Microsoft compiler does the same but I want to know why. Is it a bug which somehow got "copied" to Intel compiler or is it really neccessary to have duplicate references in order for the linker to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Igor,
It's not necessary to have the duplicates, and certainly our front end could implement a logic to coalesce these #pragma comment statements, but is there any problem with having the multiple -defaultlib references?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not a real problem as such but:
- It looks sloppy for a product labeled as "Professional"
- It is unneccessary waste of disk space
- Coalescing may improve build times for large projects
I would certainly like to see it fixed even though it is a minor issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page