I posted this question over on the LabJack LabWindows dev page, but wonder if it should be here on the forums too. Excuse the cross-post:
----------------------
I'm experiencing an issue when I attempt to include the LabJackUD.h header to more than one source file in my LabWindows project. I am doing so, because multiple modules need to call LabJack library functions.
The symptoms are a huge list of Multiply defined symbol '_LJ_xxx' in 'zzz.obj' and 'yyy.obj'. errors when linking. Mind you that none of the individual source files fails compilation.
If I simply only allow one of the *.C files to include the UD header, and then of course only call LabJack functions from that one source, all is well.
For what it's worth, I don't see this behavior with other 3rd party drivers that I'm adding to multiple source files.
It looks like the constant variables in the LabJackUD.h header file is causing the LabWindows/CVI compiler error "Multiply defined symbol" when the header file is included in multiple source files. Try the attached header file instead in your project and it should help. Also, remember to clean you project before building with this new file. The attached header file is modified so that variables are declared with "static const" instead of only "const".
Awesome, works great now! Thanks again