Hi there,
I am using gcc (under minGW) on Windows 8. In trying to build the HelloWorld.c program using the following command (as suggested from the Phidgets site):
gcc HelloWorld.c -o HelloWorld -I"C:\Program Files\Phidgets" -L"C:\Program Files\Phidgets" -lphidget21
However, I have been unable to link with the phidget21.lib. I have previously done the installation and was able to see the Phidgets panel etc which gives me the confidence that the setup is find. And I do have the phidget21.lib file in the C:\Program Files\Phidgets directory. After several unsuccessful attempts, I moved to Code Blocks IDE, but the outcome is the same. The code compiles but I get errors during the linking process.
Here is the Code Blocks output:
||=== Build: Debug in test (compiler: GNU GCC Compiler) ===|
obj\Debug\examples_unzipped\HelloWorld.o||In function `AttachHandler@8':|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|17|undefined reference to `_imp__CPhidget_getDeviceName@8'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|19|undefined reference to `_imp__CPhidget_getSerialNumber@8'|
obj\Debug\examples_unzipped\HelloWorld.o||In function `DetachHandler@8':|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|32|undefined reference to `_imp__CPhidget_getDeviceName@8'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|34|undefined reference to `_imp__CPhidget_getSerialNumber@8'|
obj\Debug\examples_unzipped\HelloWorld.o||In function `LocalErrorCatcher':|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|64|undefined reference to `_imp__CPhidget_getErrorDescription@8'|
obj\Debug\examples_unzipped\HelloWorld.o||In function `main':|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|81|undefined reference to `_imp__CPhidgetManager_create@4'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|84|undefined reference to `_imp__CPhidgetManager_set_OnAttach_Handler@12'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|88|undefined reference to `_imp__CPhidgetManager_set_OnDetach_Handler@12'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|92|undefined reference to `_imp__CPhidgetManager_set_OnError_Handler@12'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|99|undefined reference to `_imp__CPhidgetManager_open@4'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|107|undefined reference to `_imp__CPhidgetManager_close@4'|
D:\MGSL\Phidgets_gcc\examples_unzipped\HelloWorld.c|109|undefined reference to `_imp__CPhidgetManager_delete@4'|
||=== Build failed: 12 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Any suggestions/help/debug thoughts will be greatly appreciated! Thanks in advance.
Vineet