Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dlfcn.h>
- #include <unistd.h>
- #include <cstdlib>
- #include <iostream>
- int main(int argc, char**argv)
- {
- setenv("SteamAppId", "22320", 0);
- void* steamapi = dlopen("./libsteam_api64.so", RTLD_LAZY);
- if (!steamapi)
- {
- throw std::runtime_error("Can't open libsteam_api64.so");
- }
- typedef void funcsig(void);
- funcsig* steamapi_init = (funcsig*) dlsym(steamapi, "SteamAPI_Init");
- if (steamapi_init == NULL)
- {
- throw std::runtime_error("Can't find SteamAPI_Init");
- }
- steamapi_init();
- while(1)
- {
- sleep(1);
- }
- }
Add Comment
Please, Sign In to add comment