Hi,
I am having problems compiling a C++ program using the Front Panel API. I am using Visual C++ 6.0 and I have listed my steps here so that someone can point out where I’m going wrong.
- I load up VC6 and create a new Win32 Console Application (empty project)
- I copy into the working dir of the project “okCUsbFrontPanel.h” and “okFrontPanel-vc6.lib” from the installation driectory.
- I create the following source file (main.cpp)
#include “okCUsbFrontPanel.h”
int main() {
okCUsbXEM3001v2 xem;
return 0;
}
- Under Project|Settings|Link I add “okFrontPanel-vc6.lib” to the end of the ‘Object/Library Modules’ box.
- The project compiles ok but when linking the following errors appear.
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __close already defined in LIBCD.lib(close.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __lseek already defined in LIBCD.lib(lseek.obj)
LINK : warning LNK4098: defaultlib “MSVCRT” conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib “LIBCMT” conflicts with use of other libs; use /NODEFAULTLIB:library
xemprog___Win32_Debug/xemprog.exe : fatal error LNK1169: one or more multiply defined symbols found
I’m not sure how to fix this, I have tried adding /NODEFAULTLIB:libcd to project options and this can sometimes remove the errors but as soon as I start to call methods in the driver they reappear and are even less comprehendable. What makes this worse is that I can get this all to work under Linux (Slackware 10) which I thought would be the much harder task!
Thanks
Ian Gray