Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi everyone!!!
Lets see, i'm not a programmer but i'd been trying to built a program to use some leds from a HOTAS (fligh sim hardware), right now i'm trying to get the handler to this device.
The problem is that i dont understand what VC try to tell me with this error:

error LNK2028: unresolved token (0A000344) "public: void __thiscall LogitechControllerInput::ControllerInput::Update(void)" (?Update@ControllerInput@LogitechControllerInput@@$$FQAEXXZ) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)


And of course this is the program that suppose to get the device handler:

// Test Led.cpp : main project file.

#include "stdafx.h"
#include <LogiJoystick.h>
#include <LogiControllerInput.h>

using namespace System;
using namespace LogitechControllerInput;

LogitechControllerInput::ControllerInput;
LPDIRECTINPUTDEVICE8 device_;
ControllerInput* g_controller;
;
int main()
{

        g_controller->Update();
        for (INT ii = 0; ii < LG_MAX_CONTROLLERS; ii++)
        {
                if (g_controller->IsConnected(ii))
                {
                        int u=0;
                }
                if (g_controller->IsConnected(ii,LG_MODEL_G940_THROTTLE))
                {
                        device_ = g_controller->GetDeviceHandle(ii);
                }
        
        }
        
}


So please Obi One you are my last hope.
Posted

1 solution

The message is telling you that it cannot find the method LogitechControllerInput::ControllerInput::Update() which is defined somewhere outside of your main program. You need to modify your project to include the (Logitech) library that contains this method.
 
Share this answer
 
Comments
Member 9006781 30-May-12 10:21am    
That is defined in the #include <logicontrollerinput.h>.... and inside the proyect folder.
Thanks for the comment
Richard MacCutchan 30-May-12 10:32am    
It may be defined in the #include file but that is not the object code that the linker needs to find from the library.
Member 9006781 30-May-12 11:46am    
Well, the thing is that this method is not in another library, it's in a .ccp. If it was a library i should use the linker input, but .ccp i dont know what to do.
Richard MacCutchan 30-May-12 12:00pm    
Then you need to compile it into a .obj file and make sure it gets included by the linker. If, as you said earlier, it is included in the project, then this should happen automatically.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900