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

namespaces; CXX0017: Error: symbol not found

geco2
Beginner
721 Views
Hi!

I am new to Intel C++ Composer. I have a very simple question about using namespaces.

I am using VS2010 SP1 and Intel C++ Composer XE-2011 Update 5.

If I set a breakpoint at "return 0;" then I cannot access the variable test::i in VS watch window
if I compile with Intel Composer. It is written that "CXX0017: Error: symbol "test::i" not found". But if I compile with Visual C++ there is no problem, the variable can be viewed and accessed.




#include "stdafx.h"

namespace test
{
int i=10;
}


int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}






Thanks a lot!!! I am spending hours and cannot figure it out:)
0 Kudos
9 Replies
Alexander_W_Intel
721 Views

Hi,

thanks for reporting this issue. I first thought the variable i would be optimized away, but it is not the case. In assembler view I see the memory reference. So it should be visible in the debug view.

Because the Intel* compiler should behave the same as the Microsoft* compiler, this should work. I can reproduce that on my machine. I will make some more investigations and give you an update later.

Thanks,
Alex

0 Kudos
Alexander_W_Intel
721 Views
Hi,

I've found a similar bug in our internal bug tracking system. For your reference, the number is: DPD200152957. I will add you to the affected customers.

Thanks,
Alex
0 Kudos
Om_S_Intel
Employee
721 Views
In my view it should be optimized out as dead code by the compiler.
0 Kudos
geco2
Beginner
721 Views
But the optimizations were disabled (Debug mode). And I was also using a more complex program in a Debug mode and could not access anything from namespaces in VS Watch window by using the syntax "namespace::variable". Whereas, in Visual C++ every variable could be viewed.
0 Kudos
Alexander_W_Intel
721 Views
Om,

thats definitely a bug. I changed the example a little bit to the following:
[cpp]#include "stdafx.h"

namespace test {
    int i=10;
}

int z = 10; //visible

int _tmain(int argc, _TCHAR* argv[]) {
	return test::i; //test::i not visible
}[/cpp]
Making a debug build with opimization turned of. With the result having a breakpoint at the return test::i:




So the test::i is not recognized in the watch list, but it's recognized in the dissassembly. And the never used z variable is visible. So it's not a matter of optimization here.

Alex
0 Kudos
airborne18th
Beginner
721 Views
What is the status of this issue? Is there a work around? or just waiting for a new update?
0 Kudos
Alexander_W_Intel
721 Views
Hi,
at the moment I don't know a workaround for that. So you may have to wait. Is it urgent for you?
Alex
0 Kudos
airborne18th
Beginner
721 Views
Hi Alex,
No it is not urgent.

Thanks for quick response.
0 Kudos
Alexander_W_Intel
721 Views

Hi,

This issue is fixed in the latest Studio XE 2015 Composer edition product.  Please refer to this article for new product names.

Thanks,
Alex

 

0 Kudos
Reply