Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unresolved external

100 views
Skip to first unread message

Sugi

unread,
Feb 15, 2008, 12:30:20 AM2/15/08
to
Hi all,

I knew that this topic has been posted, but still couldn't found
solution for my problem, so I post again.

I am using C++ Builder 6. I created just a button on a simple form.

This is the code on ButtonClick
ShowMessage(GetEnvironmentVariable("temp"));

and I got this error :
[Linker Error] Unresolved external '__fastcall
Sysutils::GetEnvironmentVariableA(const System::AnsiString)'
referenced from C:\TEMP\TEST\UNIT1.OBJ

I have already included sysutils.hpp, so how do i resolve this
problem?

Thanks in advance,
Regards,
Sugi.

Olavi Ikonen

unread,
Feb 1, 2009, 4:36:38 AM2/1/09
to
Sugi kirjoitti:

Use something like this:

#include <winbase.h>
.
.
.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
char str[255];

GetEnvironmentVariable("temp", str, -1);
Caption = str;
}

Olli.

0 new messages