Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 30th, 2013, 01:33 AM
Skrillex Skrillex is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 Skrillex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 6 sec
Reputation Power: 0
(Need Help) Codegear Rad Studio C++ Extern Problem ( Unresolved extarnal symbol )

Hi,

My Problem : If no value is symbol error does not. But I change value is symbol Error found


Error:

Code:

[ILINK32 Error] Error: Unresolved external '_Symbol1' referenced from D:\Test1Project\DEBUG\UNIT1.OBJ
[ILINK32 Error] Error: Unresolved external '_Ex' referenced from D:\Test1Project\DEBUG\UNIT1.OBJ



PublicSymbols.h

Code:

DWORD Symbol1 = 0;

struct mStruct1
	{
		int Lvc;
		int cSnum;
		String Pfq;
		DWORD cID;
	}Ex[25];



Unit1.cpp

Code:


#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"

#include <tchar.h>
#include <windows.h>
#include <math.h>
#include <iostream>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;

extern Symbol1;

extern struct mStruct1
	{
		int Lvc;
		int cSnum;
		String Pfq;
		DWORD cID;
	}Ex[25];


__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}

void __fastcall TForm1::FormShow(TObject *Sender)
{
Symbol1 = 300000;
Ex[0].Lvc = 1;
Ex[0].cSnum = 15;
Ex[0].Pfq = "Test";
Ex[0].cID = Ex[0].cSnum * Symbol1;
}
//---------------------------------------------------------------------------




Unit2.cpp

Code:

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit2.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;

extern Symbol1;

extern struct mStruct1
	{
		int Lvc;
		int cSnum;
		String Pfq;
		DWORD cID;
	}Ex[25];
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Symbol1 = 600000;
Ex[1].Lvc = 4;
Ex[1].cSnum = 5;
Ex[1].Pfq = "Test5";
Ex[1].cID = Ex[1].cSnum * Symbol1;

}
//---------------------------------------------------------------------------

void __fastcall TForm2::Button2Click(TObject *Sender)
{
ShowMessage((String)Ex[0].Lvc + "\n" + (String)Ex[0].cSnum + "\n" + Ex[0].Pfq + "\n" + (String)Ex[0].cID);
}
//---------------------------------------------------------------------------




Thanks to all messages, Please Help me

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > (Need Help) Codegear Rad Studio C++ Extern Problem ( Unresolved extarnal symbol )

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap