11-01-2012 02:37 PM
I am updating some old source code so that it can be compiled into Windows x32 as well as x64 application. A few functions for GPIB use the global variable ibcntl. When compiling for Release (x32) it goes without error. Wen compiling for Release64 (x64) it gives the error: Undeclared identifier 'ibcntl'. The function panel (Ctrl-P) for e.g. ibfind and ibcmd suggests that this variable should be available.
Are the GPIB global variables (ibcntl, ibsta and iberr) not available for x64 ?
Or is there a declaration missing in gpib.h for x64 ?
Or are the tow variables ibcnt and ibcntl replaced with a ibcnt only ?
Or otherwise ... ...
Using:
Windows 7 x64
Labwindow/CVI 2012 (full development)
Solved! Go to Solution.
11-13-2012 03:52 AM
Hi,
Thanks for your posting here. Is it possible to make a screenshot of the error and post it to me?
I couldn't find a good info about the x64 version. Maybe with the error info I will be able to help you more.
Thanks,
Hossein
11-13-2012 05:57 AM
Hello Hossein,
I have added three screen dumps
001 with the error when compiling
002 with - as example - the control panel for one of the gpib functions
003 with the help for the count variable
When opening gpib.h, almost at the top there is a declaration for global variable that seems to be specified for win32 only (attachment 4 was not allowed)
Thanks, Jos
11-19-2012 04:54 AM
Hello Jos,
I think that it depends on your Global Variable. Please read the info which is present in the link below.
http://www.ni.com/white-paper/3458/en
If you have any other question please ask.
Kind regards,
Hossein
11-19-2012 06:56 AM
Hello Hossein,
I agree that the cause of the error seems to be the global variable ibcntl.
I am not working with threads, I am not working inside a callback. So from the function panels for e.g. ibrd as well as from the white paper that you referred, this global variable should be available. Unless there is a missing addendum for 64-bit such as "use GPIB thread functions only" or ... ...
Therefore I cannot yet select the forum option that marks this problem as solved.
I added the fourth screendump with the start of gpib.h. Please note that halfway the screen, the global variable is defined only for _NI_win32_
Regards, Jos
11-20-2012 09:13 AM
Retry: I added the fourth screendump with the start of gpib.h. Please note that halfway the screen, the global variable is defined only for _NI_win32_
12-14-2012 06:40 AM
Hi,
Sorry for my delay. I found some info which gives all information about the different between the GPIB API 32 and the new version. Moreover, you can there find info about how you can use the 64 bit version.
I hope it could be useful.
http://digital.ni.com/public.nsf/allkb/85C6F4990C8BA691862575FB006F1EDB?OpenDocument
Best regards,
Hossein