Server Help

Trash Talk - Compile and Execute

Contempt+ - Fri Jun 03, 2005 3:05 am
Post subject: Compile and Execute
I've searched these forums and google for a C++ compiler program. I've tried 3 so far, and none of them worked for me.

I've heard that notepad is the best, but I don't know how to compile it, ect. from there.

Can anyone help me?
Maverick - Fri Jun 03, 2005 3:07 am
Post subject:
You need Visual Studio 6 / .NET (some people in the community can give it to you for free - illegal ofcourse)
and I believe a free compiler is Dev-Cpp
Contempt+ - Fri Jun 03, 2005 3:23 am
Post subject:
Ok. Well, I'm trying to edit catid's biller, and I'm not having any luck with the Dev-C++.

I edited it, and when I click Compile, nothing happens. Is this a user error, or what program should I use to edit catid's biller?
Maverick - Fri Jun 03, 2005 4:35 am
Post subject:
Well it is known that Visual Studio 6 always works, Dev-Cpp is just an alternate. Ask around if someone can provide you with Visual Studio 6 - notice it is a full cd download.
Solo Ace - Fri Jun 03, 2005 4:55 am
Post subject:
Hey, we don't do such things here!

You should buy VC++ 6, or a newer version of it.
Don't steal stuff, if you can't be arsed to pay for it then stick with the free alternative.
Bak - Fri Jun 03, 2005 5:19 pm
Post subject:
make a .cpp file in notepad (paste):

Code: Show/Hide


#include "stdio.h"

int main()
{
  printf("goodbye");

  return 0;
}



save it as myprogram.c

then get a compiler called gcc( http://gcc.gnu.org/ ) and run (on the command line):

gcc -o program.exe myprogram.c

it should produce an exe file called program.exe in the same directory
Purge - Fri Jun 03, 2005 5:39 pm
Post subject:
Haha!
Contempt+ - Fri Jun 03, 2005 11:45 pm
Post subject:
I tried looking for GCC, but I'm either stupid and am too dumb to figure it out.. Wait, I'm just too stupid..

Is there any other compiler other than GCC, or is there a setup.exe for GCC anywhere?
Purge - Fri Jun 03, 2005 11:58 pm
Post subject:
Your best bet is getting MSVC++. A good, free alternative is Microsoft Embedded Visual C++ .
CypherJF - Sat Jun 04, 2005 12:15 am
Post subject:
DevC++ by Bloodshed is a nice GUI application for the g++ compiler. You may want to check it out.
Contempt+ - Mon Jun 06, 2005 2:52 am
Post subject:
I can't get DevC++ by Bloodshed or that GCC to work. I can't even install GCC.. Who knows what else I can use that's free?
CypherJF - Mon Jun 06, 2005 3:20 am
Post subject:
I've just given both DevC++ and the new MS VC++ 8.0 Express a try.

DevC++ - is okay, though it won't compile MySQL files. It also doesn't like the #pragma instructions - throws warning statements of malformed. And I couldn't get the DLL to be below 300Kb, when VC++ 6.0 produces 60Kb (both done in a 'release' state).

MS VC++ 8.0 - is nice, I really like it. However, it doesn't come with winsock2.h include file, and must download about a 500 MB SDK package, for hoping it'll work.

So I guess, I should have just stuck w/ what I knew what worked. MSVC++ 6.0.
Purge - Mon Jun 06, 2005 3:29 pm
Post subject:
Contempt+ wrote:
I can't get DevC++ by Bloodshed or that GCC to work. I can't even install GCC.. Who knows what else I can use that's free?


Read my post up there.
Muskrat - Mon Jun 06, 2005 5:32 pm
Post subject:
I've been using the MSvC++ 8, I just copied all the libs and includes over from MSVS 6 and it works just fine. icon_smile.gif
CypherJF - Mon Jun 06, 2005 5:38 pm
Post subject:
Meh, I was thinking of copying everything over but... I didn't want to reinstall VC++ 6.
Contempt+ - Tue Jun 07, 2005 5:00 am
Post subject:
I tried compiling commands.cpp, but I got this:
Code: Show/Hide

C:\Documents and Settings\Admin\Desktop\Test Biller\src\command.cpp(5) : error C2065: 'PacketStruct' : undeclared identifier
C:\Documents and Settings\Admin\Desktop\Test Biller\src\command.cpp(5) : error C2065: 'Packet' : undeclared identifier
C:\Documents and Settings\Admin\Desktop\Test Biller\src\command.cpp(6) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition


Any Ideas?
Maverick - Tue Jun 07, 2005 5:11 am
Post subject:
I recommend using VC6 because I know it works sa_tongue.gif

Contact me in-game ( I am online right now) and I will send it to you.

EDIT: My online name is MMaverick btw icon_lol.gif
Mr Ekted - Tue Jun 07, 2005 2:03 pm
Post subject:
Contempt, you need to learn the thing you are trying to use. Obviously the code is compilable. So where is PacketStruct defined? How is it known by command.cpp? Do some file searches and figure it out for yourself. Maybe you are not defining seomthing correctly in the compiler settings. Maybe you have a bad path. Maybe you are missing some files.
Purge - Tue Jun 07, 2005 3:17 pm
Post subject:
Yes, I think he's missing files. Did you add the whole src to your Project?
Contempt+ - Tue Jun 07, 2005 3:47 pm
Post subject:
No, I added just the command.cpp, I didn't know that you had to add the whole src.
Purge - Tue Jun 07, 2005 3:51 pm
Post subject:
Of course you do; it has to read from the header files.
Mr Ekted - Tue Jun 07, 2005 4:02 pm
Post subject:
Why is someone who has never compiled anything before doing this? Someone build it and send him the binaries.
Solo Ace - Tue Jun 07, 2005 5:10 pm
Post subject:
One time has to be the first time; but I agree that you should start with some Hello world project first.
Contempt+ - Tue Jun 07, 2005 6:15 pm
Post subject:
I see what you guys are saying, and yes, I agree with Solo.

I should start with some hello projects, I just have to redownload the file from maverick, since my power went out when it was at 48%. 600mb download, download rate of 20.0 kb/s
Solo Ace - Tue Jun 07, 2005 6:21 pm
Post subject:
Yeah do some Hello Mr Ekted, Hello Solo Ace, Hello Purge+ projects. sa_tongue.gif
Contempt+ - Tue Jun 07, 2005 6:23 pm
Post subject:
Lol, I'll think about it, once I do, I'll attach them
Contempt+ - Tue Jun 07, 2005 6:44 pm
Post subject:
I tried doing it, and I guess I'm doing something wrong. I copied an example off the internet, to see what it looks like, studied it, then went to compile it and build it, but it gave me this:

Code: Show/Hide

C:\Documents and Settings\Admin\My Documents\hello.cpp(1) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory


So what's going on?
Solo Ace - Tue Jun 07, 2005 6:50 pm
Post subject:
On the newer versions of VC++ you need to use "#include <iostream>" without the .h.
Notice this is only for some files.

You can actually read this in the documentation somewhere, press F1 when your cursor is on the "iostream.h", I think that should bring to the right page telling you why you can't use the "iostream.h" anymore in newer versions (than 6?).

What are you currently using, and which version of it?
Contempt+ - Tue Jun 07, 2005 6:53 pm
Post subject:
Microsoft eMbedded Visual C++ 4.0

Purge+ gave me the link for it
Purge - Tue Jun 07, 2005 9:50 pm
Post subject:
I'm assuming that's the 'Hello World' script there, so if your code is in the C format, you shouldn't save it as .cpp but rather .c. Then compile it into a .exe and run it in the command prompt.
Contempt+ - Tue Jun 07, 2005 10:30 pm
Post subject:
Ok, I did that. But it gave me another error:
Code: Show/Hide

(null) Parse Error, expecting `SEP'
'return 0'

Contempt+ - Tue Jun 07, 2005 10:33 pm
Post subject:
Oh, I'm using Dev-C++ 4 and Miracle C Workbench now
D1st0rt - Tue Jun 07, 2005 10:59 pm
Post subject:
You can make the binary output from Dev-C++ smaller by selecting "Strip executable" from the project settings
Purge - Tue Jun 07, 2005 11:02 pm
Post subject:
Contempt+ wrote:
Ok, I did that. But it gave me another error:
Code: Show/Hide

(null) Parse Error, expecting `SEP'
'return 0'


Looks like you used a bad layout for the code. Make sure it looks somewhat like this:
Code: Show/Hide

#include <stdio.h>

int main()
{
  printf("I will own you in %a seconds!");

  return 0;
}

Contempt+ - Tue Jun 07, 2005 11:07 pm
Post subject:
Hey, I got it.

The Almight Purge+ helped me out!

Thanks man
Contempt+ - Wed Jun 08, 2005 3:15 am
Post subject:
Purge+ helped me with making a "hello" program, but he didn't help me with catid's biller.

I finally got MSVC++ and when I went to make the .exe, it gave me these 4 errors:
Code: Show/Hide

--------------------Configuration: SSBilling2 - Win32 Debug--------------------
Compiling...
main.cpp
c:\documents and settings\admin\desktop\test biller\src\declares.h(2506) : fatal error C1083: Cannot open include file: 'command.h': No such file or directory
command.cpp
c:\documents and settings\admin\desktop\test biller\src\command.cpp(5) : error C2065: 'PacketStruct' : undeclared identifier
c:\documents and settings\admin\desktop\test biller\src\command.cpp(5) : error C2065: 'Packet' : undeclared identifier
c:\documents and settings\admin\desktop\test biller\src\command.cpp(6) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
Error executing cl.exe.

SSBilling2.exe - 4 error(s), 0 warning(s)


Anyone have any ideas? I added the whole src to the project, and I only edited one little part.
Mr Ekted - Wed Jun 08, 2005 3:41 am
Post subject:
Looks like you need to set your include directories for wherever command.h is located.

Tools/Options/Directories...Include Files
Contempt+ - Wed Jun 08, 2005 4:50 am
Post subject:
I had maverick help me out and we got it all fixed.

Took the original biller, copied those and got it all worked.
Maverick - Wed Jun 08, 2005 4:57 am
Post subject:
not exactly, only copied the project settings from original biller sa_tongue.gif

(Which seem to be faulty in SOS's version)
Contempt+ - Wed Jun 08, 2005 5:02 am
Post subject:
Well, I knew what I meant tongue.gif

Thanks mav
Purge - Wed Jun 08, 2005 3:24 pm
Post subject:
Contempt+ wrote:
but he didn't help me with catid's biller.


What are you talking about? You didn't even ask for help in that when we were talking.
Solo Ace - Wed Jun 08, 2005 8:44 pm
Post subject:
Don't be so defensive, he probably didn't mean it that way.
Contempt+ - Wed Jun 08, 2005 11:14 pm
Post subject:
Yeah, I meant to say that Purge only helped me with the Hello program.. Thanks man
Purge - Wed Jun 08, 2005 11:19 pm
Post subject:
Ah, I see. icon_smile.gif
Dr Brain - Thu Jun 09, 2005 12:26 am
Post subject:
Can we compile and execute this guy?
Anonymous - Tue Jun 14, 2005 3:50 pm
Post subject:
Certainly, but you will have to join him as well.

Or simply:
Don't misbehave!




Mine Go Boom,
I am sorry that I pushed to make the movie to new forms.
It just made you waste many hours on adding plugins.
I look back at the old forums, and I feel sad.
This place has lost all of its bearings and purpose.
It became nothing more than a safe haven for all the SS retards and flameboyants.
It makes the old VIE TTL look better.
At least half of them had brain and were witty, all we have is one who name himself in proclimation of being "dr. brain" and be no more than a mouthful of sewage.
It should be closed down.

Grant me moderator, and set me loose to do the job I was born for.
Cerium - Tue Jun 14, 2005 7:50 pm
Post subject:
Learn to wipe your ass properly first, grav.
Dr Brain - Tue Jun 14, 2005 11:06 pm
Post subject:
It's Dr Brain. No period.
Muskrat - Wed Jun 15, 2005 1:14 am
Post subject:
See? he can be witty, to.
Solo Ace - Wed Jun 15, 2005 5:53 am
Post subject:
Hah, "No period.", you don't say that a lot huh Brain. sa_tongue.gif
D1st0rt - Wed Jun 15, 2005 11:50 am
Post subject:
A lot more often than your girlfriend, but less often than your mother
Solo Ace - Wed Jun 15, 2005 11:56 am
Post subject:
We talk Dutch to eachother, thanks.
Maverick - Wed Jun 15, 2005 3:33 pm
Post subject:
Mooo ?
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group