Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

How to test windows .cpp in codeblocks, to linux terminal

Hi guys, so I own a windows pc and I need to test my codeblocks program on a linux server. As for my project, the professor requires it to be able to compile on a linux server.

I am a complete noob when it comes to linux.

Any help? Thanks!
(Feb 15, 2016 08:20 PM)Aus10 Wrote:  Hi guys, so I own a windows pc and I need to test my codeblocks program on a linux server. As for my project, the professor requires it to be able to compile on a linux server.

I am a complete noob when it comes to linux.

Any help? Thanks!

  1. Get a virtual machine, install linux on it, compile it and check there.

  2. Ask your professor if he knows what computers on campus use linux and if you can test, engineering buildings usually have.

  3. Find an online IDE that uses gcc-g++ and test with that. (Not a good idea.)


(Feb 15, 2016 08:23 PM)Annabelle Lee Wrote:  
  1. Get a virtual machine, install linux on it, compile it and check there.

  2. Ask your professor if he knows what computers on campus use linux and if you can test, engineering buildings usually have.

  3. Find an online IDE that uses gcc-g++ and test with that. (Not a good idea.)



Pardon my ignorance, but couldn't he also get a (free) Linux server and see if it runs on there? Could take some load off his machine and allow him to access the files from locations other than his desktop. I know this sounds weird. 😧
Moving on in life in such a way that doesn't include HF. HF allowed me to get into the security field and peaked my interest: I appreciate everyone's time, effort, and encouragement. If for some reason you have a means to message me outside HF, feel free to, but I won't be coming back.
(Feb 15, 2016 08:24 PM)Shoe Wrote:  Pardon my ignorance, but couldn't he also get a (free) Linux server and see if it runs on there? Could take some load off his machine and allow him to access the files from locations other than his desktop. I know this sounds weird. 😧

How or where would he get a free linux server at such short notice? Unless he has a pc laying around he can install linux on, doesn't seem feasible.
If it's pure C/C++ , then you don't need to worry about which machine you are compiling on. The code is by nature portable and can be compiled on both operating systems. So long as you don't rely on OS functionality. If your code works on Windows and does not involve any OS API directly then it will run the same on Linux.
(Feb 15, 2016 08:29 PM)Annabelle Lee Wrote:  How or where would he get a free linux server at such short notice? Unless he has a pc laying around he can install linux on, doesn't seem feasible.

I didn't see any sense of urgency for OP's post so I didn't figure he needed it that quickly. AWS offers a free server for a year (I believe it's capable of Ubuntu and such), DigitalOcean gives out free credit left and right, etc etc.
Moving on in life in such a way that doesn't include HF. HF allowed me to get into the security field and peaked my interest: I appreciate everyone's time, effort, and encouragement. If for some reason you have a means to message me outside HF, feel free to, but I won't be coming back.
(Feb 16, 2016 06:15 AM)Shoe Wrote:  I didn't see any sense of urgency for OP's post so I didn't figure he needed it that quickly. AWS offers a free server for a year (I believe it's capable of Ubuntu and such), DigitalOcean gives out free credit left and right, etc etc.

I simply presumed since he has a school project, it's due relatively soon, but I see your point. Cheers.
Was able to figure it out using argc and argv stuff. Thanks guys! Tried virtual machine, confusing stuff. :P


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HackersOct 28, 2023 10:25 AM 6 253 Oct 28, 2023 10:25 AM
Last Post: Hackers
[Python] by DumbChickenFeb 11, 2022 10:09 PM 3 96 Feb 11, 2022 10:09 PM
Last Post: MeW11
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_