September 15, 2011

p-himik p-himik
Lab Rat
263 posts

Cl and too long command line

 

In my project’s pro file i added a very long line to DEFINES variable. When trying to compile (MSVC 9.0) following error appears (without any dependency on that line’s contents):

  1. jom 1.0.6 - empower your cores
  2.  
  3. command failed with exit code 2
  4. command failed with exit code 2
  5. command failed with exit code 2
  6. command failed with exit code 2
  7. command failed with exit code 2
  8. The process "C:\Qt\qtcreator-2.3.0\bin\jom.exe" exited with code 2.
  9. Error while building project yaBuhgalterProject (target: Desktop)
  10. When executing build step 'Make'

Without that long line everything is OK.
Is that a bug in cl.exe?

3 replies

September 15, 2011

Tobias Hunger Tobias Hunger
Robot Herder
3387 posts

More likely in cmd. See http://support.microsoft.com/kb/830473

September 15, 2011

p-himik p-himik
Lab Rat
263 posts

Thank you for the link.
I’m using QtCreator and i don’t think that command line was longer than 2047 characters. Unfortunately i can’t recheck it now but tomorrow i’ll try to figure out maximum length of that line.

September 16, 2011

p-himik p-himik
Lab Rat
263 posts

To my surprise maximum line’s length is 1661. If i add one more character errors in the main post appear.
Maybe it’s not line’s length that causes that errors but too long -D parameter (1016 characters), i don’t know.

 
  ‹‹ FakeVim clipboard commands?      [Moved] Qt Cocoa help ››

You must log in to post a reply. Not a member yet? Register here!