Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Using EasyTab from CVI in VC++

Hello,

I have rewritten a CVI code for VC++
Everything works fine, except EasyTab.

When I just include "easyTab.h" to the code the compiler retruns
errorcode C2955 'list' in easyTab.h
at int easyTab_GetPanellist(int panel, int easyTabCtrl, ListType *list)

for using a TemplateClass a TemplateArgument list is requiered
(Maybe this errortext differs at your Maschine because it is translated from German)

I am using MS-VC 6.0 and Ni-CVI7.0

Greetings from
the lake of constance
Juergen
0 Kudos
Message 1 of 3
(3,575 Views)
I haven't tried this out, but I suspect that this is being caused by a name collision between the list parameter in EasyTab.h and the list data type in the standard library. The name collision typically will not occur because the fully qualified data type name is std::list. Do you have a global "using namespace std;" statement in the file (or an included header file) before you include EasyTab.h? If so, a good way to fix this would be to remove this global statement and fully qualify the list data type only where you need it or add using statements in the source files where you need to use the standard library.
0 Kudos
Message 2 of 3
(3,538 Views)
Hello drohacek,

Thanks for your answer, the hint was fine and finally there is a namespace std in my code.
It is impossible to remove it, because a lot of classes have to be rewritten.

I sloved it in an other way i have copied the EasyTab.h, renamed it and removed the function
because it will never need it in my code and it is also unused in the Ni-tabfuctions i use.

It works well.

There is just one ohter hint for all other users fight against the problem implementing
Fp-code in c++ (incl. mfc) projects. In most cases compilation works fine but the linker fails.
To solve this i did it this way:
Create a WIN32-DLL (implizied link) from the FP in CVI and take sure that all reqired stuff is
added to the dll in loadexternalmodule options.
Just add the created lib to your c++ project and place the dll to execution or system folder.
Now it should run

Have a nice Day

Juergen Dodek
0 Kudos
Message 3 of 3
(3,516 Views)