c++ is cool but the libs are 10MB

This commit is contained in:
2024-03-30 18:06:41 +01:00
parent 1e6da377fb
commit 051523a77e
3 changed files with 7 additions and 19 deletions

View File

@@ -5,5 +5,5 @@ target_link_libraries(init syscalls_interface)
target_include_directories(init PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(hello2 hello2.cpp)
add_executable(hello2 hello2.c)

6
src/test/hello2.c Normal file
View File

@@ -0,0 +1,6 @@
#include <stdio.h>
int main() {
printf("Hi!\n");
}

View File

@@ -1,18 +0,0 @@
#include <iostream>
void badfn() {
throw std::runtime_error("oops");
}
int main() {
std::cout << "hi" << std::endl;
try {
std::cout << "try" << std::endl;
badfn();
std::cout << "ok" << std::endl;
} catch (std::exception &e) {
std::cout << "huh" << std::endl;
std::cout << e.what() << std::endl;
}
std::cout << "fin" << std::endl;
}