Skip to content

Commit

Permalink
Linux build fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1maker committed Oct 27, 2024
1 parent 00774eb commit fdc5af0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ else()
target_link_libraries(${PROJECT_NAME} ${CMAKE_BINARY_DIR}/external/installed/lib/libSDL3.a)
find_package(X11 REQUIRED)
target_link_libraries(${PROJECT_NAME} ${X11_LIBRARIES})
find_package(PkgConfig REQUIRED)
pkg_check_modules(SpeechD REQUIRED speech-dispatcher)

target_link_libraries(${PROJECT_NAME} ${SpeechD_LIBRARIES})


endif()
target_link_libraries(${PROJECT_NAME} Poco::Foundation)
target_link_libraries(${PROJECT_NAME} Poco::Net)
Expand Down
2 changes: 0 additions & 2 deletions Release/Tests/memcpy.ngt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
string str;
int main() {
show_console();
str = "Hello, World!";
uint64 source = str.c_str();
uint64 destination = malloc(20);
Expand All @@ -11,7 +10,6 @@ int main() {
// Print the contents of the destination array
printf("Destination: %s\n", c_str_to_string(destination));
free(destination);
exec("pause");
return 0;
}

9 changes: 4 additions & 5 deletions Release/Tests/memory_stream_test.ngt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void main() {
shared void main() {
memory_stream stream(0);

// Writing to the stream
Expand All @@ -7,20 +7,19 @@ void main() {
stream.write(str.c_str(), str.length());
// Getting current position
int pos = stream.tell();
printf("Current Position: " + pos);
println("Current Position: " + pos);

// Seeking back to the start
stream.seek(0);

// Reading from the stream
string data;
stream.read(data, stream.size); // Read 13 bytes
printf("Data read from stream: " + data);
println("Data read from stream: ", data);

// Checking the size of the stream
size_t size = stream.size;
printf("Size of stream: " + size);
println("Size of stream: ", size);
stream.clear();
exec("pause");
}

Binary file added perf.data
Binary file not shown.

0 comments on commit fdc5af0

Please sign in to comment.