Hot answers tagged

4

CMake uses several variables to set the default compiler. You are mostly interested in setting CC variable to override default C compiler. In your case that would be: CC=gcc-4.9 cmake ../ - You might need to apt-get install g++-4.9 if the TrinityCore is written in C++, and that would be: CXX=g++-4.9 cmake ../ -


3

Firstly using the gcc switch -c you are telling the compiler to only compile and not link which doesn't produce an executable binary to get an executable binary you need to not use this switch. The correct command would be: gcc cents.c However since this command does not specify the output file name the default name a.out will be used for the binary so ...


2

You can put your gcc command right after ssh command, such as ssh target@ip "gcc -o mybin main.c && ./mybin" will compile main.c in your target's home folder and if compiling is successful, run "mybin" to see output, if there is any output of this program.


2

gcc 4.8 had a bug related to this. You could try the workaround mentioned in the bug report: Add the flags -Wl,--no-as-needed to the compilation.


1

You can also customize the output file by using gcc <sourcefilename> -o <destinationfilename> Note: you can even dump the output file in a different folder by including the path in the file name. Ex gcc mysource.c -o ./myfolder/mybinary.out This will create a file named mybinary.out in the folder, myfolder, within your current working ...


1

When write programs in C, you must compile the program with a compiler (here gcc). So you get an executable file (here a.out). you should give that file execution permissions with the following command: chmod +x a.out and then run your compiled program with ./a.out


1

I had this issue - it was because Anaconda2 didn't have the GLIBCXX_3.4.20 version of whatever that thing is. Only up to .19, the same as yours. However, Ubuntu's library did have it. So I just created a softlink/shortcut in the Anaconda library to the actual Linux library containing that GLIBCXX_3.4.20, replacing the previous one, and it worked fine after ...



Only top voted, non community-wiki answers of a minimum length are eligible