1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 20:01:56 +00:00
srs/trunk/research/st/hello-st.cpp
Winlin ff91757a3a
ST: Research adds examples that demos pthread and helloworld. v6.0.118 (#3989)
1. `trunk/research/st/exceptions.cpp` About exceptions with ST, works
well on linux and mac, not work on cygwin.
2. `trunk/research/st/pthreads.cpp` About pthreads with ST, works well
on all platforms.
3. `trunk/research/st/hello.cpp` Hello world, without ST, works well on
all platforms.
4. `trunk/research/st/hello-world.cpp` Hello world, with ST, works well
on all platforms.
5. `trunk/research/st/hello-st.cpp` A very simple version for hello
world with ST, works well on all platforms.
2024-03-24 09:28:46 +08:00

16 lines
250 B
C++

/*
g++ hello-st.cpp ../../objs/st/libst.a -g -O0 -o hello-st && ./hello-st
*/
#include <stdio.h>
#include "../../objs/st/st.h"
void foo() {
st_init();
st_sleep(1);
printf("Hello World, ST!\n");
}
int main() {
foo();
return 0;
}