Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for generated path length #83

Open
ivmartel opened this issue May 17, 2012 · 0 comments
Open

Check for generated path length #83

ivmartel opened this issue May 17, 2012 · 0 comments
Labels
Milestone

Comments

@ivmartel
Copy link
Contributor

From a user:

The solution was much simpler. After following a discussion about regarding 0xC0000417 ( invalid parameter to the c runtime) in a larger open source project and their fixes for it(using char* pointers instead of char[] arrays of defined length, circumventing the security checks for bounded arrays), i slowly realized that my problem also could be related to a string length issue. But not for the to-be-created program, but for the Microsoft compiler itself.
And indeed, looking up the specs delivers a string limit of 8191 characters for the command line (Command prompt (Cmd. exe) command-line string limitation). As CMake sadly uses absolute paths in everything, this becomes an issue quickly.

So the simple answer to my utmost dull problem is: The command line for the compiler was to long. I had my project in something like d:/scratch/thomas/projects/current/gimias which caused apparently the overflow for cl.exe at the stage of the precompiled headers target. One can blame the guys in Redmond for just letting their compiler crash instead of giving a precise error message in that case.

Good thing is, after 2 weeks of installing every hotfix possible my Visual Studio is up to date :P

One thing i noted then, as i did a lot with MITK before, is that the current makefiles of MITK check the build path length for that reason and won`t generate the make files if too long. Maybe its worth looking into it and integrate that function, it might safe other people some trouble in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant