Declare AnsiString function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • afraze
    New Member
    • Aug 2007
    • 18

    Declare AnsiString function

    Hi!

    My problem is that:

    When i declare an AnsiString function in my Form.h("Form.h" is an ex. name)
    i am getting this error:

    [ILINK32 Error]:Unresolved external ' __fastcall System::TObject ::ToString() referenced from . . . . ........

    only this type(ansistring type) function gives error...

    How can i fix this problem!

    my ide is : c++ 2006
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Have you included the .h in your program, as well as put the location of Form.h into your classpath, or used a path in the include statement?

    Comment

    • afraze
      New Member
      • Aug 2007
      • 18

      #3
      sicarie,

      Yes, i had done before my first post. but i cant figure out this problem.i think i overlooked some code or stuff but i cant find the right way

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        This looks amazingly like C#.

        However, a link error occurs after the compile step and is caused by a missing library by a source file that was not supplied to the linker.

        Please confirm if this is C# so I can move this thread to the correct forum.

        Comment

        • afraze
          New Member
          • Aug 2007
          • 18

          #5
          No, this is c++, after my all post, i tried a new project, and it worked. still i cant understand that why my first program didnt work? where is my mistake?

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            This still looks like C#. From what you say so far, I am guessing this is Managed C++ a.k.a. Visual C++.NET.

            It may be your first project was not managed C++ but was a Console Applciation. That would explain the missing library.

            Comment

            • afraze
              New Member
              • Aug 2007
              • 18

              #7
              no it is a borland c++ form.. so now , it doesnt matter for me because i solved..
              this is a good news for me.. isnt it

              Comment

              Working...