Here is an simple tutorial that shows how to deploy a C++ program to a Linux server which has similar architecture and software package as your development Linux workstation.
- Compile your C++ program into executable
- Here is a shell script that Copying shared library dependencies. You can use this script to copy all dependent dynamic libraries into one folder. (note: you may want only keep those custom libraries you used and remove those libraries provide by operating system)
- Copy your C++ program and the library folder to the linux sever you want to deploy on, using the following command to put the dynamic folder name to link library path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_library_path
- Note: if you want this setting to be persistent, you need to add this command to your .bash_rc or .bash_profile file.
No comments:
Post a Comment