Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » StringParse missing declaration (Errors while compiling / missing libraries ...)
StringParse missing declaration [message #59827] Thu, 27 April 2023 21:33 Go to previous message
dschoni is currently offline  dschoni
Messages: 15
Registered: January 2021
Location: Switzerland
Promising Member
I've managed to install TheIDE on Linux (Ubuntu 22.04 LTS).
Everything works fine, until I want to use SystemInfo functions.

As soon, as I get any function like this:
#elif defined(PLATFORM_POSIX)

bool GetDriveSpace(String drive, 
	//uint64 &totalBytes,	// To determine the total number of bytes on a disk or volume, use IOCTL_DISK_GET_LENGTH_INFO.
	uint64 &freeBytesUser, 	// Total number of free bytes on a disk that are available to the user who is associated with the calling thread.
	uint64 &totalBytesUser, // Total number of bytes on a disk that are available to the user who is associated with the calling thread.
	uint64 &totalFreeBytes)	// Total number of free bytes on a disk.
{
	freeBytesUser = totalBytesUser = totalFreeBytes = 0;
	
	StringParse space = Sys("df -T");
	if (space == "")
		return false;
	
	while (drive != space.GetText())
		;
	space.MoveRel(-10);	space.GoBeginLine(); 
	space.GetText();	space.GetText();	// Jumps over device path and filesystem
	totalBytesUser = 1024*space.GetUInt64();
	space.GetText();						// Jumps over used space
	freeBytesUser  = totalFreeBytes = 1024*space.GetUInt64();
	return true;
}


I've got errors:
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (409): error: 'StringParse' was not declared in this scope
 (): 409 |         StringParse space = Sys("df -T");
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (410): error: 'space' was not declared in this scope; did you mean 'splice'?
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (413): error: 'space' was not declared in this scope; did you mean 'splice'?
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (415): error: 'space' was not declared in this scope; did you mean 'splice'?
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (427): error: 'StringParse' was not declared in this scope
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (428): error: 'info' was not declared in this scope
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (432): error: 'info' was not declared in this scope
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (436): error: 'info' was not declared in this scope
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (439): error: 'info' was not declared in this scope
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (451): error: aggregate 'GetDriveInformation(Upp::String, Upp::String&, Upp::String&, int&, Upp::String&)::statfs buf' has incomplete type and cannot be defined
/home/sd/Tech/Linux/upp/MyApps/FolderTree/main.cpp (452): error: invalid use of incomplete type 'struct GetDriveInformation(Upp::String, Upp::String&, Upp::String&, int&, Upp::String&)::statfs'


The same code works fine on Windows, because "StringParse" is not used there. But I have no idea, how to change the code.

How to solve this?

Best Regards
Daniel
 
Read Message
Read Message
Read Message
Previous Topic: Assist++ : Parse error
Next Topic: Linux Mint installation issue
Goto Forum:
  


Current Time: Tue May 07 14:00:42 CEST 2024

Total time taken to generate the page: 0.01908 seconds