Can't compile Arduino CapSense example - compilation

I'm trying to work with the CapSense library for Arduino. However, I can't manage to run the example included with the package, called "CapSenseSketch". When I try just opening the file and running it (I've tried both Arduino 1.0 and 1.0.1), I get a compiler error that says 'CapSense does not name a type", and also
CapSenseSketch.cpp:1:22: error: CapSense.h: No such file or directory
CapSenseSketch:11: error: 'CapSense' does not name a type
CapSenseSketch:12: error: 'CapSense' does not name a type
CapSenseSketch:13: error: 'CapSense' does not name a type
CapSenseSketch.cpp: In function 'void setup()':
CapSenseSketch:17: error: 'cs_4_2' was not declared in this scope
CapSenseSketch.cpp: In function 'void loop()':
CapSenseSketch:24: error: 'cs_4_2' was not declared in this scope
CapSenseSketch:25: error: 'cs_4_6' was not declared in this scope
CapSenseSketch:26: error: 'cs_4_8' was not declared in this scope
There is an include statement at the top of the code,
#include <CapSense.h>
and I thought that would be the problem, so I changed the brackets to quotes and still got an error saying "Error compiling" and:
CapSenseSketch.cpp.o: In function `__static_initialization_and_destruction_0':
CapSenseSketch.cpp:15: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp:16: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp:17: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp.o: In function `loop':
CapSenseSketch.cpp:28: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp:29: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp:30: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp.o: In function `setup':
CapSenseSketch.cpp:21: undefined reference to `CapSense::set_CS_AutocaL_Millis(unsigned long)'
Any ideas? I've worked with CapSense on another computer and changing the brackets to quotes worked fine that time, but it doesn't seem to be doing much now.

Apparently including external files works a bit differently in the arduino ide. It's not enough to simply have an include statement at the top of your code, you must instead manually go to sketch > add file for every external file you want to use. In my case, I only did this for one out of the two files I was trying to use.

Related

LUFA with Eclipse but without Makefile

I want to use LUFA for my ATMEGA32U4 to communicate via CDC. So to start I created a project in Eclipse and imported the LUFA folder and the files for the Device VirtualSerial demo. The thing is, that I want to do that without using the makefile (mostly because I have never used makefiles before). Is that possible and what do I need to do? I have tried a lot, but I get errors all the time. Is there any instruction?
Thanks!
Sebastian
P.S.: Just to be clear. I want to use the "Managed Builder", so that I don´t have to do anything with the makefile, but Eclipse does that for me.
P.P.S.: I also tried http://www.fourwalledcubicle.com/files/LUFA/Doc/140928/html/_page__exporting_library.html
with AS7 and Eclipse, but it didn´t work with both.....
P.P.S.: When I try to build the project I get the error
'Building target: Test1.elf'
'Invoking: AVR C Linker'
avr-gcc -Wl,-Map,Test1.map -mmcu=atmega32u4 -o "Test1.elf" ./LUFA/Platform/UC3/Exception.o ./LUFA/Platform/UC3/InterruptManagement.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.o ./LUFA/Drivers/USB/Core/UC3/Device_UC3.o ./LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.o ./LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.o ./LUFA/Drivers/USB/Core/UC3/Host_UC3.o ./LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.o ./LUFA/Drivers/USB/Core/UC3/Pipe_UC3.o ./LUFA/Drivers/USB/Core/UC3/USBController_UC3.o ./LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.o ./LUFA/Drivers/USB/Core/AVR8/Device_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Host_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.o ./LUFA/Drivers/USB/Core/ConfigDescriptors.o ./LUFA/Drivers/USB/Core/DeviceStandardReq.o ./LUFA/Drivers/USB/Core/Events.o ./LUFA/Drivers/USB/Core/HostStandardReq.o ./LUFA/Drivers/USB/Core/USBTask.o ./LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.o ./LUFA/Drivers/USB/Class/Host/AudioClassHost.o ./LUFA/Drivers/USB/Class/Host/CDCClassHost.o ./LUFA/Drivers/USB/Class/Host/HIDClassHost.o ./LUFA/Drivers/USB/Class/Host/MIDIClassHost.o ./LUFA/Drivers/USB/Class/Host/MassStorageClassHost.o ./LUFA/Drivers/USB/Class/Host/PrinterClassHost.o ./LUFA/Drivers/USB/Class/Host/RNDISClassHost.o ./LUFA/Drivers/USB/Class/Host/StillImageClassHost.o ./LUFA/Drivers/USB/Class/Device/AudioClassDevice.o ./LUFA/Drivers/USB/Class/Device/CDCClassDevice.o ./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o ./LUFA/Drivers/USB/Class/Device/MIDIClassDevice.o ./LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.o ./LUFA/Drivers/USB/Class/Device/PrinterClassDevice.o ./LUFA/Drivers/USB/Class/Device/RNDISClassDevice.o ./LUFA/Drivers/USB/Class/Common/HIDParser.o ./LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.o ./LUFA/Drivers/Peripheral/XMEGA/TWI_XMEGA.o ./LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.o ./LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.o ./LUFA/Drivers/Board/Temperature.o ./LUFA/Build/DMBS/Template/Template.o ./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o ./Descriptors.o ./VirtualSerial.o
./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o: In function main':
HID_EEPROM_Loader.c:(.text.startup.main+0x0): multiple definition ofmain'
./LUFA/Build/DMBS/Template/Template.o:Template.c:(.text.startup.main+0x0): first defined here
./VirtualSerial.o: In function main':
VirtualSerial.c:(.text.startup.main+0x0): multiple definition ofmain'
./LUFA/Build/DMBS/Template/Template.o:Template.c:(.text.startup.main+0x0): first defined here
./LUFA/Drivers/USB/Class/Device/AudioClassDevice.o: In function Audio_Device_ProcessControlRequest':
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0xf8): undefined reference toCALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x15a): undefined reference to CALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x182): undefined reference toCALLBACK_Audio_Device_GetSetInterfaceProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x1e4): undefined reference to CALLBACK_Audio_Device_GetSetInterfaceProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x236): undefined reference toCALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x284): undefined reference to CALLBACK_Audio_Device_GetSetInterfaceProperty'
./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o: In functionHID_Device_ProcessControlRequest':
HIDClassDevice.c:(.text.HID_Device_ProcessControlRequest+0xd0): undefined reference to CALLBACK_HID_Device_CreateHIDReport'
HIDClassDevice.c:(.text.HID_Device_ProcessControlRequest+0x18e): undefined reference toCALLBACK_HID_Device_ProcessHIDReport'
./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o: In function HID_Device_USBTask':
HIDClassDevice.c:(.text.HID_Device_USBTask+0xa2): undefined reference toCALLBACK_HID_Device_CreateHIDReport'
./LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.o: In function MS_Device_USBTask':
MassStorageClassDevice.c:(.text.MS_Device_USBTask+0xf4): undefined reference toCALLBACK_MS_Device_SCSICommandReceived'
./LUFA/Drivers/USB/Class/Common/HIDParser.o: In function USB_ProcessHIDReport':
HIDParser.c:(.text.USB_ProcessHIDReport+0x5bc): undefined reference toCALLBACK_HIDParser_FilterHIDReportItem'
./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o: In function main':
HID_EEPROM_Loader.c:(.text.startup.main+0x4): undefined reference to_binary_InputEEData_bin_size'
HID_EEPROM_Loader.c:(.text.startup.main+0x6): undefined reference to _binary_InputEEData_bin_size'
HID_EEPROM_Loader.c:(.text.startup.main+0xe): undefined reference to_binary_InputEEData_bin_start'
HID_EEPROM_Loader.c:(.text.startup.main+0x10): undefined reference to `_binary_InputEEData_bin_start'
collect2.exe: error: ld returned 1 exit status
make: *** [Test1.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
Solved it!
There were a lot of c-files, that were unnecessary, but eclipse wanted to compile them anyway. I excluded them and now it´s working.

How to get better error output with Visual Studio

I was working on a project and got the following errors
Error (active) the default constructor of "Input" cannot be referenced -- it is a deleted function EquationSolver c:\Users\Kim\Documents\Visual Studio 2015\Projects\EquationSolver\EquationSolver\main.cpp 10
Error C2280 'Input::Input(void)': attempting to reference a deleted function EquationSolver <project_dir>\main.cpp 10
Since it is almost impossible to find the cause of the error from this, I tried compiling with gcc with -Wall and got following output
main.cpp: In function 'int main()':
main.cpp:10:9: error: use of deleted function 'Input::Input()'
Input input;
^~~~~
In file included from main.cpp:2:0:
Input.hpp:16:7: note: 'Input::Input()' is implicitly deleted because the default definition would be ill-formed:
class Input
^~~~~
Input.hpp:16:7: error: use of deleted function 'Expressions::Expressions()'
In file included from Input.hpp:11:0,
from main.cpp:2:
Expressions.hpp:8:7: note: 'Expressions::Expressions()' is implicitly deleted because the default definition would be ill-formed:
class Expressions
^~~~~~~~~~~
Expressions.hpp:8:7: error: uninitialized reference member in 'class Expressions'
Expressions.hpp:17:8: note: 'Expressions::Vec& Expressions::left' should be initialized
Vec& left;
^~~~
Expressions.hpp:8:7: error: uninitialized reference member in 'class Expressions'
class Expressions
^~~~~~~~~~~
Expressions.hpp:18:8: note: 'Expressions::Vec& Expressions::right' should be initialized
Vec& right;
^~~~~
This output is much more verbose and quickly helped me find the origin, which was a misplaced & (class member should be Vec left, was Vec& left).
Is it possible to make Visual Studio as verbose?
When putting Visual Studio to /Wall, I get >1800 warnings, most completely unrelated to my project, but I still only get those two errors.

Can't compile CapacitiveSensor example in Arduino

I am trying to use the Capacitive Sensors Library from the Arduino Playground with Arduino 1.5.3 for Intel Galileo.
While trying to compile the example Sketch of the library with nothing touched I get the following error:
Arduino: 1.5.3 (Windows 7), Board: "Intel® Galileo"
CapacitiveSensor.cpp: In constructor
'CapacitiveSensor::CapacitiveSensor(uint8_t, uint8_t)':
CapacitiveSensor.cpp:30:63: error: 'F_CPU' was not declared in this
scope CapacitiveSensor.cpp:43:10: error: 'PinDescription' has no
member named 'ulPin' CapacitiveSensor.cpp:44:10: error:
'PinDescription' has no member named 'pPort'
CapacitiveSensor.cpp:45:31: error: 'portModeRegister' was not declared
in this scope CapacitiveSensor.cpp:46:9: error: base operand of '->'
is not a pointer CapacitiveSensor.cpp:48:9: error: 'PinDescription'
has no member named 'ulPin' CapacitiveSensor.cpp:49:10: error:
'PinDescription' has no member named 'pPort'
CapacitiveSensor.cpp:51:9: error: base operand of '->' is not a
pointer CapacitiveSensor.cpp:52:12: error: base operand of '->' is not
a pointer CapacitiveSensor.cpp:55:18: error: 'noInterrupts' was not
declared in this scope CapacitiveSensor.cpp:57:16: error: 'interrupts'
was not declared in this scope CapacitiveSensor.cpp: In member
function 'void CapacitiveSensor::set_CS_Timeout_Millis(long unsigned
int)': CapacitiveSensor.cpp:133:73: error: 'F_CPU' was not declared in
this scope CapacitiveSensor.cpp: In member function 'int
CapacitiveSensor::SenseOneCycle()': CapacitiveSensor.cpp:141:18:
error: 'noInterrupts' was not declared in this scope
CapacitiveSensor.cpp:151:16: error: 'interrupts' was not declared in
this scope
I downloaded the files and imported the "CapacitiveSensor"-Folder into (I did those steps one after the other, not at the same time.):
The libraries folder under Documents/arduino/.
The libraries folder in the arduino folder where the arduino.exe is stored.
Onto arduino-1.5.3/hardware/libraries/ (because this is mentioned on the site where I downloaded it)
And I tried this: Here Because it seemed to be the same error as I had. But it didnt work.
I also deleted my Arduino and reinstalled it.
Anyone has an Idea?
Thanks in advance,
Clemens
There is a similar question on the Arduino forum but I don't know if your issue is exactly the same: [FIXED][CapacitiveSensor] Can't compile with Due (port manipulation)
It doesn't look like the Arduino folks are very responsive. The user modified register names and eventually put his own library out there.
*"...changed the uint8_t registers to RwReg (compiler doesn't complain) and I replaced the use of portModeRegister(PIN) with simple pinMode(PIN, MODE) calls (it's slower but it works)."*

Error compiling with Poco in XCode 4

I am working on a project at work that includes a project that was built using the Poco library. When I attempt to compile the project, XCode gives me many errors related to the STL. After some searching around on the internet, I was able to deduce that including Poco can be the cause of this, but no answers on how to fix this problem.
Here are the errors:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:298:9: No member named 'memmove' in namespace 'std'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:321:7: Use of undeclared identifier 'ostreambuf_iterator'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:321:27: '_CharT' does not refer to a value
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:321:35: Expected unqualified-id
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:326:9: Use of undeclared identifier 'ostreambuf_iterator'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:326:29: '_CharT' does not refer to a value
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:326:37: Expected unqualified-id
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:331:5: Variable '__copy_aux' declared as a template
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:331:16: Use of undeclared identifier 'istreambuf_iterator'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:331:36: '_CharT' does not refer to a value
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:331:43: Expected expression
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:407:18: Use of undeclared identifier 'ostreambuf_iterator'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:407:38: '_CharT' does not refer to a value
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:407:46: Expected unqualified-id
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:446:9: No member named 'memmove' in namespace 'std'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:600:10: No member named 'memset' in namespace 'std'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:608:10: No member named 'memset' in namespace 'std'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:616:10: No member named 'memset' in namespace 'std'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/bits/stl_algobase.h:908:31: No member named 'memcmp' in namespace 'std'
Any help would be greatly appreciate. I should note that I am not calling the Poco library directly, but some of the code from the other project makes reference to it.

Link Error 2001 when linking to User32.dll

I'm trying to link an object file that uses two methods declared in winuser.h and defined in User32.dll: GetMonitorInfo and WindowFromMonitor. The source compiles to an object file just fine, but when I try to link, I get the following error output:
D3dCtx.obj : error LNK2001: unresolved external symbol xGetMonitorInfo
D3dCtx.obj : error LNK2001: unresolved external symbol xMonitorFromWindow
The thing is, I don't call "xGetMonitorInfo" or "xMonitorFromWindow". Running grep on all source files shows that only "GetMonitorInfo" and "WindowFromMonitor" are being called. I'm properly including windows.h, which includes winuser.h. I'm also properly setting my LIBPATH in the linker options, which is confirmed by verbose link output.
The following also appears in my verbose link output:
Found __imp_GetMonitorInfoA
Referenced in nafxcw.lib(afxribboncategory.obj)
Referenced in nafxcw.lib(afxtooltipctrl.obj)
Referenced in nafxcw.lib(afxribbonkeytip.obj)
Referenced in nafxcw.lib(afxfullscreenimpl.obj)
Referenced in nafxcw.lib(afxframeimpl.obj)
Referenced in nafxcw.lib(afxglobalutils.obj)
Referenced in nafxcw.lib(afxdropdowntoolbar.obj)
Referenced in nafxcw.lib(wincore.obj)
Referenced in nafxcw.lib(afxglobals.obj)
Referenced in nafxcw.lib(afxpopupmenu.obj)
Referenced in nafxcw.lib(afxpropertygridtooltipctrl.obj)
Loaded User32.lib(USER32.dll)
Found __imp_MonitorFromWindow
Referenced in nafxcw.lib(wincore.obj)
Loaded User32.lib(USER32.dll)
Furthermore, GetMonitorInfo is defined in winuser.h as:
WINUSERAPI
BOOL
WINAPI
GetMonitorInfoA(
__in HMONITOR hMonitor,
__inout LPMONITORINFO lpmi);
WINUSERAPI
BOOL
WINAPI
GetMonitorInfoW(
__in HMONITOR hMonitor,
__inout LPMONITORINFO lpmi);
#ifdef UNICODE
#define GetMonitorInfo GetMonitorInfoW
#else
#define GetMonitorInfo GetMonitorInfoA
#endif // !UNICODE
When I change all reference to "GetMonitorInfo" to "GetMonitorInfoA", I only get
D3dCtx.obj : error LNK2001: unresolved external symbol xMonitorFromWindow
as my linker error output. Unfortunately, MonitorFromWindow doesn't seem to have multiple versions available.
I should note that I am using the 64bit versions of the libraries, link, and cl.
What's going on here, and how can I successfully link my program?
I don't know whether you were able to find solution to this or not But I had the same problem and the reason this was happening was that I had a file included named multimon.h
Looks like in case of 64 bit compilation, due to Macro definitions, the definitions of these functions are coming from two sources and probably one from multimon.h is overriding and is wrong.
I solved it by just commenting out this include and it has started to link fine.
//#include <multimon.h>

Resources