Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

passing parameters from VS - preprocessor

Stan
Beginner
580 Views
Hello,

I've found a problem when passing parameters from VS env. to IntelCC (however it looks like VS bug)

I had a problem with compiling project using BOOST + STL - I got all the time that compilation options are not same for both libraries. To make a long story short one - __STL_DEBUG preprocessor had to be used.

I did use one in Preprocessor settings from within VS GUI - having the 'command line' looks like:

/c /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__STL_DEBUG" /D "_DLL_VERSION" /D "_WINDLL" /D "_MBCS" /D "_VC80_UPGRADE=0x0710" /EHsc /MTd /Zp4 /GS /fp:fast /Fo".\Debug/" /W3 /nologo /ZI

So - as you can see - VS by default put preprocessor into ""

And ... it was not working, however adding manually into command line __STL_DEBUG did solve the problem:

/c /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_DLL_VERSION" /D "_WINDLL" /D "_MBCS" /D "_VC80_UPGRADE=0x0710" /EHsc /MTd /Zp4 /GS /fp:fast /Fo".\Debug/" /W3 /nologo /ZI /D __STL_DEBUG

Did try invoking Intelcc from the command line and indeed - no difference between /D "__STL_DEBUG" and /D __STL_DEBUG

Wired.....

be carefull - maybe you're also wasting your time due to such problems..

Stan

0 Kudos
5 Replies
JenniferJ
Moderator
580 Views
Thanks for the posting.

I'll check it as well to make sure it's not Intel IDE integration related.

Jennifer

0 Kudos
levicki
Valued Contributor I
580 Views
Stan,

You haven't specified which compiler and MSVC version you use.

By the way, you can try replacing icl.exe with a small program (you can write it in less than 2 minutes) which just dumps command line arguments to a file and exits so you can determine for sure whether compiler is getting the option or not.

0 Kudos
JenniferJ
Moderator
580 Views
I'm not sure how I did it, but at one point, my .vcproj file contains:
PreprocessorDefinitions="TEST_1;TEST_2; _TEST_3"

So build failed. Once I cleaned it up, all is fine. Now I couldn't reproduce.
0 Kudos
levicki
Valued Contributor I
580 Views
I'm not sure how I did it, but at one point, my .vcproj file contains:
PreprocessorDefinitions="TEST_1;TEST_2; _TEST_3"

So build failed. Once I cleaned it up, all is fine. Now I couldn't reproduce.

Perhaps you pressed the Enter key twice? 0x0A is a hex-code for new line character and &# seems to be a way to represent it in HTML/XML (escaped text). Perhaps project conversion tool mistakenly tries to escape the string?

0 Kudos
Stan
Beginner
580 Views
Quoting - Igor Levicki

Perhaps you pressed the Enter key twice? 0x0A is a hex-code for new line character and &# seems to be a way to represent it in HTML/XML (escaped text). Perhaps project conversion tool mistakenly tries to escape the string?


Hi,

This is VS 2005 + Intel 11.0.66

I'll replace compiler by the batch to examine passed parameters - that's a good point - thanks. I don't imagine - I've put any special char - but on the other hand - everything is possible..

Thanks,
Stan
0 Kudos
Reply