C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[68041] Linker Error문의
초초초 [likedisplay] 1587 읽음    2012-08-26 17:26
질문 1 Linker 에러발생 문의

Lib문제라고 나오기는 하는데 정확이 이해가 안갑니다.
어디서 추가를 하나요???
Builer vr6

[Linker Error] Unresolved external '__InitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '__ExitVCL' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\CP32MTI.LIB|crtlvcl
[Linker Error] Unresolved external '_main' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\C0X32.OBJ

질문 2 Module 연결 문의
         unit1에서 include "structur.h" <-- 불러올려면
         unit2를 structur.h file명으로 바꿔야 되지 않나요?? 시도해 봤으나 바꿔지지는 않음.



샘플코드

file name Unit1.cpp

#include <iostream.h>                                                
#include <conio.h>                                                   
#include <stdlib.h>                                                  
#pragma hdrstop
#include "structur.h"
void displayRecord(int, mailingListRecord mlRec);                    
int main(int, char**)                                                
{                                                                    
//
// create an array of mailingListRecord structures
//
mailingListRecord listArray[3];
cout << endl;
int index = 0;
// get three records
//
do {
cout << "First Name: ";
cin.getline(listArray[index].firstName,


sizeof(listArray[index].firstName) - 1);
cout << "Last Name: ";
cin.getline(listArray[index].lastName,
sizeof(listArray[index].lastName) - 1);
cout << "Address: ";
cin.getline(listArray[index].address,
sizeof(listArray[index].address) - 1);
cout << "“City: ";
cin.getline(listArray[index].city,
sizeof(listArray[index].city) - 1);
cout << "State: ";
cin.getline(listArray[index].state,
sizeof(listArray[index].state) - 1);
char buff[10];
cout << "Zip: ";
cin.getline(buff, sizeof(buff) - 1);
listArray[index].zip = atoi(buff);
index++;
cout << endl;
}
while (index < 3);
//
// clear the screen
//
clrscr();
//
// display the three records
//
for (int i=0;i<3;i++) {
displayRecord(i, listArray[i]);
}
//
// ask the user to choose a record
//
cout << "Choose a record: ";
char rec;                                                            
//                                                                   
// be sure only 1, 2, or 3 was selected                              
//                                                                   
do {                                                                 
rec = getch();                                                       
rec -= 49;                                                           
} while (rec < 0 || rec > 2);                                        
//                                                                   
// assign the selected record to a temporary variable                
//                                                                   
mailingListRecord temp = listArray[rec];                             
clrscr();                                                            
cout << endl;                                                        
//                                                                   
// display the selected record                                       
//
displayRecord(rec, temp);                                            
getch();                                                             
return 0;                                                            

                                                                     
}                                                                    
void displayRecord(int num, mailingListRecord mlRec)                 
{                                                                    
cout << "Record " << num + 1 << ":" << endl;
cout << "Name: " << mlRec.firstName << " ";
cout << mlRec.lastName;
cout << endl;
cout << "Address: " << mlRec.address;
cout << endl << " ";
cout << mlRec.city << ", ";
cout << mlRec.state << " ";
cout << mlRec.zip;                                                   
cout << endl << endl;                                                
}                                    

file name Unit2.cpp

#ifndef _STRUCTUR_H
#define _STRUCTUR.H
struct mailingListRecord {
char firstName[20];
char lastName[20];
char address[50];
char city[20];
char state[5];
int zip;
};
#endif

+ -

관련 글 리스트
68041 Linker Error문의 초초초 1587 2012/08/26
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.