Author Topic: C++ help needed  (Read 12674 times)

0 Members and 4 Guests are viewing this topic.

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
C++ help needed
« on: October 21, 2004 01:54 pm CDT »
I have Borland C++ (the command-line compiler) and it works fine for all of my needs except for now.  I have a situation where I need to create a DLL file.  I know Visual C++ can handle such a situation, but seeing as I have no money, and don't really need VC++, I would hope that someone here can tell me how I can get Borland to handle the compile.

i.e. is there a command line argument I could use to specify that I want a DLL produced, or is it something within the .cpp file itself?
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #1 on: October 25, 2004 10:53 am CDT »
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #2 on: October 25, 2004 02:21 pm CDT »
Thanks for the help, I think I've seen that page before, but its not really anything new...

As we speak WinMX is running and im 33rd in line for my copy of Visual C++.  Thanks anyways though.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #3 on: October 26, 2004 04:58 pm CDT »
hehe.. Yeah I'm not a programer.. I did and do help out with figuring some codes out, but that's a bit different from ever usign a compiler or knowing how compiler commands work.

I left my C++ book at home... or I could have checked it for you!
Doh!

Peace.
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #4 on: November 2, 2004 12:28 pm CST »
Use Bloodshed Dev ++... It is exactly like visual C++ except it is free, and has better documentation as well as is updated to the most recent standard.

I use that for C++

I also use Crimson Editor / notepad for Java, which is a language you might want to look into if you are interested in expanding your programming knowledge.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #5 on: November 2, 2004 08:52 pm CST »
Thanks for the advice... but I already "acquired" Visual C++ if you catch what I mean...  As for Java, I've already taken a year of it and got a 4 on that AP test and now I'm one of 2 people in my entire county to be in independent study for... yep, you guessed it, a 2nd year of Java.

(my school system is not small by any means, it has more funding than Rhode Island.  Yes, it spends more on students that a state does for existing)

Ozzy if you really like Java, I can very happily recommend BlueJ.  It's a Java compiler that has some really usefull features.  (Visual representation of class relations and heirarchy along with expanded debug info past the malarkeyty, cryptic messages most compilers give.)  Also, for the really interesting side of Java, look up JOGL.  JavaOpenGL, someone has no life and ported OpenGL libraries to Java in full and last time I heard, it was going to be addopted as the standard by SunMicrosystems.  Fun stuff.  (Think full Winows/Linux/Mac programs in 3D using the same source code.)
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #6 on: November 3, 2004 06:34 am CST »
I like crimson editor just because it color codes items and uses a tad more memory than notepad. I use the standard javac. Just seems to work for me =/.

As for books... Well I have a membership to books24x7.com
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #7 on: November 19, 2004 04:05 pm CST »
Well, for anyone that cares to know, I've been working on my project (although today was the first time I've gotten to really sit down and hammer out some problems in a long while.)

Essentially, it comes to this:  With Trillian (http://www.ceruleanstudios.com), all incomming messages are in html format so that the mediums can be consistent client side (AIM, MSN, etc have a single format from html).  This is supposed to be useful but for my ideas it was horrific.

First problem solved: I have a function that strips html code from incomming messages.  (Some of you may laugh, but it's all done with pointers to char arrays, for statements, and some other trickery).  This wouldn't have been so bad, but every compile to test, I had to build a DLL, enable it with Trillian, load Trillian back when it crashed (index out of bounds), disable the DLL to re-compile, then test again.  It's a very slow method.

So anyways, the main point:  If you haven't talked to me recently, I'm making an AIM screen name (GladioStricto) which will be a Trillian plugin/port of Tokath.  My main purpose in comming here is to ask what people want to see for this bot.  I have madlibs planned, jibberish, top5, quote, and about 10 other things planned out and ready to get started.  All I'm asking is for new ideas (don't be retarded).  Any ideas that are not easily tranferred to a text based interface, any ideas that are insane in difficulty, or any ideas posted by Jonah will be ignored.  (Unless of course he can stop being a moron for 30 sec and give useful ideas.)
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

Sinister

  • Uber Menace
  • *******
  • Posts: 1,125
  • Reputation: +0/-0
    • http://www.stormpages.com/snowmann69
(No subject)
« Reply #8 on: November 19, 2004 05:17 pm CST »
Lol about Jonah!  Dude, that sounds sweet!

Oh yeah, btw, the exp system doesn't work on the thing you gave me.  Ppl cant level.  Everything else seems to work ok.
« Last Edit: December 31, 1969 06:00 pm CST by Sinister »

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #9 on: November 19, 2004 10:48 pm CST »
lmao, I'm not sure where I left off in that code, but one nifty thing that I know for sure that works is if you use admin to #sethp on someone, then immediately #cast advheal or massheal or advfullheal (I think I created that last spell).  Anyways, if you are within a certain range in terms of levels from the person you heal, you will gain EXP (assuming your class has D Cast at all :-P)
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #10 on: November 20, 2004 03:52 pm CST »
Ozzy or Part, check over this for me, I'm still working on it as I'm writing this so I may figure it out before you read it, but any help is appreciated.

Quote from: "Compiler"
--------------------Configuration: Gladio Bot - Win32 Debug--------------------
Compiling resources...
Compiling...
gladio_main.c
c:\gladio bot\source\gladio.h(81) : error C2061: syntax error : identifier 'gladio_util_compare'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : ';'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : 'type'
gladio_util.c
c:\gladio bot\source\gladio.h(81) : error C2061: syntax error : identifier 'gladio_util_compare'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : ';'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : 'type'
c:\gladio bot\source\gladio_util.c(216) : warning C4018: '<' : signed/unsigned mismatch
c:\gladio bot\source\gladio_util.c(238) : error C2061: syntax error : identifier 'gladio_util_compare'
c:\gladio bot\source\gladio_util.c(238) : error C2059: syntax error : ';'
c:\gladio bot\source\gladio_util.c(238) : error C2059: syntax error : 'type'
c:\gladio bot\source\gladio_util.c(257) : warning C4029: declared formal parameter list different from definition
c:\gladio bot\source\gladio_util.c(258) : warning C4013: 'gladio_util_compare' undefined; assuming extern returning int
gladio_windows.c
c:\gladio bot\source\gladio.h(81) : error C2061: syntax error : identifier 'gladio_util_compare'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : ';'
c:\gladio bot\source\gladio.h(81) : error C2059: syntax error : 'type'
Error executing cl.exe.

Gladio Bot.dll - 12 error(s), 3 warning(s)
(The util at line 216 is not a problem, I know the logic flows correctly at that point.)

In the .h file where I pre-define all functions (this is the only one that does not work):

Quote from: "Code in Question"
bool gladio_util_compare(char *input, char[] parse);

In the .c or .cpp file where I formally define all functions:

Quote from: "Code in Question"
bool gladio_util_compare( char *input, char[] parse)
{
   bool consistent = false;
   int i;

   if( strlen(input) == strlen(parse)) {
      consistent = true;
      for( i = 0; i <= strlen(input); i++) {
         if( input != parse) {
            consistent = false;
            break;
         }
      }
   }

   return consistent;
}


Based on what the error is returning, I'm really going out on a limb (ok, not really) and thinking that it doesn't like something about how I declared the function and then defined the function.  But, like I sad previously, the other functions I declare and define in the same way (namely copy and paste the function and add the ; at the end).  So I'm at a loss for what the problem is.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #11 on: November 20, 2004 09:07 pm CST »
Go out to dinner, get in fight with parents, come back home and...  Realize that char[] name is not the syntax for arrays, its char name[].  Also, does anyone know why Visual C++ has a problem with functions of type bool?  I changed it over to int and just return 1 or 0 so its the exact same as it would have been, but I just don't like it...
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #12 on: November 21, 2004 09:32 pm CST »
Alright, I have myself a new problem...



This is the buddy icon I made with intent on using it for my bot.  If you right click, you can see that its size is much larger than the 7k allowed by AIM.  If anyone knows how to shrink this down approx 1/7th its original size and not lose quality/frames, I will send you the PSD file I used in ImageReady.  (Personally, I have tried all I know and I don't think it can be done.)
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #13 on: November 24, 2004 06:54 am CST »
I don't use Visual C++ for the reason that is is made by Microsoft. If something is made by Microsoft, it is managed by Microsoft and isn't updated to the ANSI standard.

To answer your question, your best bet is going to a web site I used to go to for C++. They have forums with experienced professional coders that could easily help you with that. Now that I go back to that web site, I see the forums have been taken down for some reason. The web site was http://www.cplusplus.com.

At any rate, I'm sure your question could also be answered at http://msdn.microsoft.com/visualc/ if you looked through it. Microsoft can provide good documentation sometimes.

EDIT: Sorry the webiste for the forums was not the one I was talking about.. The real site is http://cboard.cprogramming.com/ and it is still running. These guys there know their stuff.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

GStricto

  • Elvin Legion
  • *****
  • Posts: 463
  • Reputation: +0/-0
(No subject)
« Reply #14 on: November 24, 2004 04:05 pm CST »
Thanks for the forums for the help.  Also, Visual C++ is a necessary evil because it's the only compiler that creates DLLs...  Hence, I have to go to the dark side.
« Last Edit: December 31, 1969 06:00 pm CST by GStricto »

Quote from: "Artorius"
Gnight.... Gstricto is obviously picking on you because he is a dirty racist.
So ironic that a heart made by man, when broken is easily fixed.   But a human hurt can last a lifetime.