Ok! go in steps.
- 1) As other reviewers have commented already correctly, the object files are generated by the compiler so that the linker can relate code libraries and generated code, in addition to carrying out more operations.
For this I think you may link directly their object files in your remote machine in this mode:
$ g++ -o mybin myobj.o
Note that the linker should be able to find all references to the library included in the project!
2) Normally in a standard C++ Project in NetbeansIDE,after you build proyect, you can find the executable file in the folder "dist" example "dist/Debug/GNU-Linux-x86" This file is ready to run on local and remote machines based on linux.
3) It's possible that your executable need some system library. This library in your local machine are correctly referenced, but not in your remote machine
To resolve this problem can help you the command,
$ ldd mybin
You can view the entire process simplified in this screenshot:
- 4) I would like to clarify another important point, the NetBeans IDE can be configured to use any compiler and any settings. Currently the most common versions of NetbeansIDE under Linux are configured by default to use GCC installed on your machine and this makes clear that the object files generated from NetbeansIDE, are the same that you would generate compiled directly from console.
Steps of compilation in NetBeans: