sumit_tuwien Posted May 24, 2018 Report Share Posted May 24, 2018 Hello All, SCV-2.0.1 Compiled with gcc-4.8.1 using the option -DSCV_DISABLE_USING_NAMESPACES. Fails to compile suit while using -DSCV_DISABLE_USING_NAMESPACES. Errors comes from STL library headers, mainly trait libs. Happens for both gcc-4.8.1 and clang-3.9. I use tuples. Is that any mistake I am doing ? Regards, Sumit P.S: Tried to reproduce this with a minimal test case, but failed! Quote Link to comment Share on other sites More sharing options...
maehne Posted May 25, 2018 Report Share Posted May 25, 2018 Hello Sumit, Do you mean that you specified -DSCV_DISABLE_USING_NAMESPACES explicitly when compiling the SCV library itself? The preprocessor definition SCV_DISABLE_USING_NAMESPACES is only meant for use in user applications, i.e., you need to pass when compiling your own code. See the RELEASENOTES section 2 for details. When we first prepared the SCV 2.0.1release, we didn't want to import the std namespace by default, but it caused too much trouble with existing code bases, which lead to this ugly method to opt out of it. Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted May 25, 2018 Author Report Share Posted May 25, 2018 Hello Torsten, Greetings! Actually, initially I compiled the library without -DSCV_DISABLE_USING_NAMESPACES and started getting the error while compiling the suit with -DSCV_DISABLE_USING_NAMESPACES. I thought I misunderstood those lines in RELEASENOTES and hence I recompiled the library with -DSCV_DISABLE_USING_NAMESPACES and still getting the compilation error! The compilation error is not coming when I compile the suit without -DSCV_DISABLE_USING_NAMESPACES. I though I will be able to create a minimal reproduction easily and it did not show anything. This also indicates that there possibly something wrong the way I am using the library. Currently struggling with nonsensical messages from the compiler. I am trying to bring it down. Regards, Sumit Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted May 25, 2018 Author Report Share Posted May 25, 2018 Okay, giving up! Happy with dirty global namespace. Compiler messages makes no sense Quote Link to comment Share on other sites More sharing options...
maehne Posted May 25, 2018 Report Share Posted May 25, 2018 Let me be clear: You don't need to provide -DSCV_DISABLE_USING_NAMESPACES during the compilation of the SCV library itself. You only pass -DSCV_DISABLE_USING_NAMESPACES once you compile your application and link it to the SCV library. Quote Link to comment Share on other sites More sharing options...
sumit_tuwien Posted May 25, 2018 Author Report Share Posted May 25, 2018 Hello Torsten, I confirm you that I am using library where I am not providing -DSCV_DISABLE_USING_NAMESPACES during the compilation of the SCV library itself. I am using DSCV_DISABLE_USING_NAMESPACES while compiling my user code. At this point of time, after some blind commenting/uncommening in my code, lastly I found that the source of the problem is a header file which is included from a very "infamous" C library. Earlier, we had some issues with scv include (scv-2.0.a), when this library defined a macro # define std::printf SOMETHING_I_DO_NOT_WANT_TO_DISCLOSE which I had to undef after the inclusion of this file. Again the issue is coming from here now! I will have to do further debug. Strange thing is that, last time it was easy to find the issue because of meaningful compiler message. But this time the compiler messages does not make any sense. Regards, Sumit Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.