|
-
July 6th, 2009, 03:38 PM
#1
Declaration of office
I have a function in the header Form1.h calling from Motory.cpp.
But not me refer to it.
Do you know what toje?
Declaration:
Motory.cp :
#pragma warning(disable : 4996) // Disable warnings about some functions in VS 2005
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include "stdafx.h"
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include <process.h>
#include "USMCDLL.h"
#include "Form1.h"
using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Windows::Forms;
using namespace Motory_2;
void zapisListBox1(DWORD,char*,char*);
//-----------------------------------------------------
void PrintDevices(USMC_Devices &DVS)
{
for(DWORD i = 0; i < DVS.NOD; i++)
{
zapisListBox1(i, DVS.Serial[i], DVS.Version[i]);
}
}
Declaration Form1.h :
void zapisListBox1(DWORD i, char* Serial, char* Version)
{
this->listBox1->Items->Add("Device - "+(i+1)+",\tSerial Number - "+Convert::ToString(Serial)+",\tVersion - "+Convert::ToString(Version));
}
Error:
Motory_2.obj : error LNK2028: unresolved token (0A000020) "void __clrcall zapisListBox1(unsigned long,char *,char *)" (?zapisListBox1@@$$FYMXKPAD0@Z) referenced in function "void __clrcall PrintDevices(struct USMC_Devices_st &)" (?PrintDevices@@$$FYMXAAUUSMC_Devices_st@@@Z)
Motory_2.obj : error LNK2019: unresolved external symbol "void __clrcall zapisListBox1(unsigned long,char *,char *)" (?zapisListBox1@@$$FYMXKPAD0@Z) referenced in function "void __clrcall PrintDevices(struct USMC_Devices_st &)" (?PrintDevices@@$$FYMXAAUUSMC_Devices_st@@@Z)
C:\Documents and Settings\Brabčáček\Dokumenty\Visual Studio 2008\Projects\Motory_2\Debug\Motory_2.exe : fatal error LNK1120: 2 unresolved externals
Thank you for your help!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|