LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler err: Initializer must be constant { OpenFile(

Hello,
Here where I got the example from: Help-CVI Library, search SetFilePtr(). I copied and I pasted the exmaple, when I compile it, it stops at OpenFile() giving the error msg "Initializer must be constant".
0 Kudos
Message 1 of 3
(4,382 Views)
Well, I forgot to wrap the code with main(). That was the problem. Sorry.

Shamsan
0 Kudos
Message 2 of 3
(4,382 Views)
Shamsan,

FYI: When you want to quickly test a piece of code with no main or anything, you can use the interactive execution Window. Go to "Window>>Interactive Execution" paste the code there and you should be able to run it from top to bottom with no main or extra code.

Good luck with your project.

Juan Carlos
N.I.
0 Kudos
Message 3 of 3
(4,382 Views)