Help Please!~

This is a discussion on Help Please!~ within the C++ Programming forums, part of the General Programming Boards category; I have a new application made in BCB. I write the code, Code: //--------------------------------------------------------------------------- #ifndef Unit1H #define Unit1H //--------------------------------------------------------------------------- #include ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    180

    Help Please!~

    I have a new application made in BCB. I write the code,

    Code:
    //---------------------------------------------------------------------------
    
    #ifndef Unit1H
    #define Unit1H
    //---------------------------------------------------------------------------
    #include <Classes.hpp>
    #include <Controls.hpp>
    #include <StdCtrls.hpp>
    #include <Forms.hpp>
    #include <ExtCtrls.hpp>
    //---------------------------------------------------------------------------
    class TForm1 : public TForm
    {
    __published:	// IDE-managed Components
            TTimer *Down;
            TTimer *Up;
            TTimer *Left;
            TTimer *Right;
       TTimer *Down;
            TTimer *Up;
            TTimer *Left;
            TTimer *Right;
             void __fastcall UpTimer(TObject *Sender);
            void __fastcall LeftTimer(TObject *Sender);
            void __fastcall RightTimer(TObject *Sender);
            void __fastcall DownTimer(TObject *Sender);
            void __fastcall FormCreate(TObject *Sender);
            
    private:	// User declarations
    public:		// User declarations
            __fastcall TForm1(TComponent* Owner);
            void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
            TShiftState Shift);
    
    
    
            TCanvas *workCanvas;
            TRect	*BackRect;
            TImage *backgroundImage;
    };
    //---------------------------------------------------------------------------
    extern PACKAGE TForm1 *Form1;
    //---------------------------------------------------------------------------
    #endif
    but it throws linker errors:

    Code:
    [C++] Phantom_Fixed.cpp(1): 
    [C++] Unit1.cpp(1): 
    [C++] Loaded cached pre-compiled headers
    [Linker] 
    [Linker Error] Unresolved external '_Enemy' referenced from M:\FINAL PROJECT\PHAMTOM FIXED\UNIT1.OBJ
    [Linker Error] Unresolved external '_BackRect' referenced from M:\FINAL PROJECT\PHAMTOM FIXED\UNIT1.OBJ
    [Linker Error] Unresolved external '_workCanvas' referenced from M:\FINAL PROJECT\PHAMTOM FIXED\UNIT1.OBJ
    [Linker Error] Unresolved external '_User_Ship' referenced from M:\FINAL PROJECT\PHAMTOM FIXED\UNIT1.OBJ
    Does anyone know how to fix this? thx

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>Unresolved external '_Enemy'
    This means your source is calling a function that the linker cannot find. Are you linking all the necessary modules when you're compiling?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    180
    i think so... all that stuff is in a header file, which are included.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ~Help - File processing with user input~
    By indy in forum C Programming
    Replies: 20
    Last Post: 12-04-2003, 08:09 PM
  2. Dev-c++ 4.0 compile errors
    By DigitalNOISE in forum C++ Programming
    Replies: 9
    Last Post: 07-12-2002, 04:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21