summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 09:58:32 -0500
committerGitHub <noreply@github.com>2025-11-29 09:58:32 -0500
commit83e5efd79e102713aef3178f003402dcd5613e67 (patch)
tree913c82e8c40c1963751dc4d5052d41d72dad6680 /examples
parente4aa91788918b5a0acf3c4f4ce2c8d560ad5949c (diff)
parent463a0c01f96d86c9c91f02903bc1d194c5e55b15 (diff)
Merge pull request #26 from amlel-el-mahrouss/develop
Develop
Diffstat (limited to 'examples')
-rw-r--r--examples/url/CMakeLists.txt15
-rw-r--r--examples/url/url.cc24
2 files changed, 39 insertions, 0 deletions
diff --git a/examples/url/CMakeLists.txt b/examples/url/CMakeLists.txt
new file mode 100644
index 0000000..7195d6c
--- /dev/null
+++ b/examples/url/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+cmake_minimum_required(VERSION 3.15...3.31)
+
+project(
+ Url
+ VERSION 1.0
+ LANGUAGES CXX)
+
+find_package(Boost REQUIRED COMPONENTS container)
+
+add_executable(Url fix.cc)
+
+set_property(TARGET Url PROPERTY CXX_STANDARD 20)
+target_include_directories(Url PUBLIC ../../include/ocl)
+target_link_libraries(Url PRIVATE Boost::container)
diff --git a/examples/url/url.cc b/examples/url/url.cc
new file mode 100644
index 0000000..b4cc924
--- /dev/null
+++ b/examples/url/url.cc
@@ -0,0 +1,24 @@
+/*
+ fix example
+ Written by Amlal El Mahrouss.
+ Licensed under the Boost Software License
+ */
+
+#include <core/error_handler.hpp>
+#include <net/url.hpp>
+#include <unistd.h>
+#include <io/print.hpp>
+#include <sys/socket.h>
+
+/* finally test it */
+int main(int argc, char** argv)
+{
+ ocl::net::url url_type(ocl::net::url::file);
+
+ url_type /= "bin";
+ url_type /= "ls";
+
+ ocl::io::println(url_type.assemble());
+
+ return EXIT_SUCCESS;
+}