Help needed Please! COS110/121 Tuks

I am Penguin

Executive Member
Joined
Jan 26, 2009
Messages
7,713
Eclipse is just the Integrated Development Environment (IDE). It helps to speed up the development process by providing you with little nice-to-haves like code-completion, tabbed viewing, etc. Once you have the IDE in place, you still need to have a compiler in order to change the C++ (man-readable) into binary (machine-readable).

If she's going to be working on Linux, she likely needs the Linux version. 32-bit / 64-bit shouldn't make too much difference if she's submitting source code. Having a 64-bit compiler simply optimises the executable to run on 64-bit capable machines. So 32-bit is a safe bet.

Thanks then I presume I must download the 32bit Linux version. Now how do I install the Eclipse Linux 32 IDE to compile or run on Cygwin?

I already installed and ran Eclipse for windows environment updated with CDT6.0 so I can use that to makefile (source) for compiling in the Linux based compiler?

So what /How do I load the Linux version of Eclipse in Cygwin or is that not required.
 

I am Penguin

Executive Member
Joined
Jan 26, 2009
Messages
7,713
Next up is just basic programming concepts, it doesn't help you try and pass COS110/COS121 and you barely scrapped by on COS131 because that means you already had issues there, that's just gonna exasperate the situation.

That is the crux I think, She thought she is doing well with COS131 but did not do well in the exam, there must be a missing link of understanding then. So what is she to do then, derigister COS110/121 and redo COS131?

What is the best options/solutions. She only got the handbooks for COS131 late in the game due to the Study Loan delay issues. She is now desperate and very emo.
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Thanks then I presume I must download the 32bit Linux version. Now how do I install the Eclipse Linux 32 IDE to compile or run on Cygwin?

I already installed and ran Eclipse for windows environment updated with CDT6.0 so I can use that to makefile (source) for compiling in the Linux based compiler?

So what /How do I load the Linux version of Eclipse in Cygwin or is that not required.

Well Cygwin is just a Unix-like environment for Windows. On Linux, you're already in a Unix-like environment, so not necessary.

The easiest way to get Eclipse up and running on Debian is to use the repositories.

In a console, type:
Code:
su
then enter the root password.
Then type
Code:
aptitude install eclipse eclipse-cdt

If you're connected to the Internet, Debian will grab the required packages and install them for you.

Of course you can also download the .deb file from http://www.getdeb.net and install it using the "double-click" method.

That is the crux I think, She thought she is doing well with COS131 but did not do well in the exam, there must be a missing link of understanding then. So what is she to do then, derigister COS110/121 and redo COS131?

What is the best options/solutions. She only got the handbooks for COS131 late in the game due to the Study Loan delay issues. She is now desperate and very emo.

As mentioned before, the library has plenty of resources for her to go through. For fast learning, she can also use the Internet. There are loads of great tutorials out there.

And the forum is a great place to get help; get her to sign up and ask questions if she gets stuck. The kinds of questions she will likely ask will be simple, and thus more likely to be answered fast. Once she stops needing to ask simple questions, she'll already be able to help herself by making use of Google and/or her favourite book.
 

sn3rd

Expert Member
Joined
Jan 18, 2008
Messages
4,305
Oh, and if my advice for installing eclipse et al is incorrect, forgive me; it's not the way I usually do things.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
7,208
That is the crux I think, She thought she is doing well with COS131 but did not do well in the exam, there must be a missing link of understanding then. So what is she to do then, derigister COS110/121 and redo COS131?

What is the best options/solutions. She only got the handbooks for COS131 late in the game due to the Study Loan delay issues. She is now desperate and very emo.

LOL, not redo it, that is waste of time & money, fastest way to learn ANY COS module:

Practicals!

It's like mathematics, you sit down, you take a practical, you do the practical until it works 100%

Especially use it at home because you have the internet. If you don't know how to do a while loop you google: while loop c++, if you don't know how to read a text file in C# you google, read text C#, etc.

Using that ANY practical on 1st/2nd year level is possible, hell even COS 314 (Artificial Intelligence), which is supposed to be really hard, there was PLENTY of theoretical info on Neural Networks, Game Tree's, etc. everything we did in that module, practical or otherwise.

Don't go copy paste obviously, that is grounds for expulsion from the University (plagiarism),

1) Look at it
2) Understand it
3) Implement it in your own style

Btw. do practicals and use information from the internet rather than sitting there trying to memorize the textbook (pointless), in 1st year I bought COS textbooks but they still lie in my room unused because the modules were completely focused on practice. I rather used the internet. If there are theory questions like what is polymorphism I find the wikipedia to be far better than any of the textbooks I owned.
 

I am Penguin

Executive Member
Joined
Jan 26, 2009
Messages
7,713
LOL, not redo it, that is waste of time & money, fastest way to learn ANY COS module:

Practicals!

It's like mathematics, you sit down, you take a practical, you do the practical until it works 100%

Especially use it at home because you have the internet. If you don't know how to do a while loop you google: while loop c++, if you don't know how to read a text file in C# you google, read text C#, etc.

Using that ANY practical on 1st/2nd year level is possible, hell even COS 314 (Artificial Intelligence), which is supposed to be really hard, there was PLENTY of theoretical info on Neural Networks, Game Tree's, etc. everything we did in that module, practical or otherwise.

Don't go copy paste obviously, that is grounds for expulsion from the University (plagiarism),

1) Look at it
2) Understand it
3) Implement it in your own style

Btw. do practicals and use information from the internet rather than sitting there trying to memorize the textbook (pointless), in 1st year I bought COS textbooks but they still lie in my room unused because the modules were completely focused on practice. I rather used the internet. If there are theory questions like what is polymorphism I find the wikipedia to be far better than any of the textbooks I owned.

Thanks, thats a great help. That is exactly what was happening.

Question:
What year are you doing now?

I have installed Cygwin on Win7 as well as Eclipse and CDT 6.0
If I want to compile in Eclipse, how would it know to use Cigwyn and compile for Linux? Should eclipse be installed as a Linux IDE?
 
Last edited:

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
7,208
Thanks, thats a great help. That is exactly what was happening.

Question:
What year are you doing now?

Academic year 3
Historic year 4
I changed degrees...

have installed Cygwin on Win7 as well as Eclipse and CDT 6.0
If I want to compile in Eclipse, how would it know to use Cigwyn and compile for Linux? Should eclipse be installed as a Linux IDE?

If the code compiles on Windows with Cygwin, then it will compile EXACTLY like that in Linux, so let's say you have a file open in Eclipse called main.cpp:

Code:
#include <iostream>
using namespace std;

int main()
{

	string stackString = "This string is located on the Stack!";
	string *heapString = new string("This string is located on the Heap!");
	string *pointerToVariableOnTheStack = &stackString;
	(*pointerToVariableOnTheStack) = "I've changed stackString!";
	delete heapString;
	return 0;
}

That code compiles on Cygwin and therefore compiles on Linux, so I have that file open in Eclipse, I click build, build was successful, now I take that file, just like that, main.cpp, copy it on my flash-drive.

Log onto my Linux machine and in the console, go to the directory where main.cpp is located, type:
gcc main.cpp
ls
now run the executable, most likely it'll be:
./main.out

gcc main.cpp compiles the application
ls shows the files in the current directory, the executable will most likely be listed in green. Linux is CASE SENSITIVE. The ./ is so that Linux is aware of the executable files context, otherwise main.out can be located anywhere on the system.

main.out won't run on Windows because it is a Linux binary but it'll most likely run on other versions of Linux.

On Windows that file will compile to main.exe, it will once again only run on MS based OS's like DOS,Windows,etc.

As you can see the .cpp files (IE. the source code) stays EXACTLY the same, only the binary changes, so to be clear, source needs no change, you only recompile in Linux. You don't even need Eclipse to recompile you can simply use the console and a Make file or if you have plenty of energy compile each file on it's own, etc. etc.

You only upload your source to the auto marker so it'll run just like that, just keep in mind, once again, Linux is case sensitive so if you call linkedlist.h then the file name should be linkedlist.h not Linkedlist.h or any other variation.
 
Last edited:
Top