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.
Use something like this:
#include <winbase.h>
.
.
.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
char str[255];
GetEnvironmentVariable("temp", str, -1);
Caption = str;
}
Olli.