• Welcome to Valhalla Legends Archive.
 

[C++] BNCSUtil Problem

Started by TheNewOne, December 28, 2005, 01:00 PM

Previous topic - Next topic

TheNewOne

Alright I have been having some problems with BNCUtil, me never using .dll's before and all. And I was wondering how I should attack this. Ive read threw posts with no prevail on this site. Ive tried including bncsutil.h in my project, with only errors of missing includes to be found. Any help on how this is done will be appreciated in full. Thanks.

The New One.

MyndFyre

You should #include any appropriate BNCSUtil headers (.h files) and also link against BNCSUtil.lib.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

TheNewOne

Ok I added bncsutil.lib to the linking setup, ive included all header files to bncsutil. And i still continue to get the error. Of not beign able to locate <bncsutil/multi.h> etc..


MyndFyre

Tell your compiler to include the BNCSUtil package's /src/ folder for #includes.  For example, at work I have two copies of BNCSUtil in my projects folder, 1.0.4 and 1.1.0.  The main path to 1.1.0 is:

C:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\BNCSUtil\bncsutil-1.1.0

If I wanted to include the BNCSUtil headers, I'd tell my compiler to search for additional #include files in:

C:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\BNCSUtil\bncsutil-1.1.0\src

With the Visual C++ compiler, this is accomplished by adding the following command-line switch to the cl command:

/I "C:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\BNCSUtil\bncsutil-1.1.0\src"

Or, if you're in Visual Studio 7 or newer, under your project properties dialog, under C/C++, General, the first option is "Additional Include Directories".
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

TheNewOne

#4
Hmm how do i make BNCSUtil.lib for Visual Studio 6's Lib Folder?
I continue to get the error...

LINK : fatal error LNK1104: cannot open file "bncsutil.lib"

TheNewOne

Ok i did a bit of research on this, finding nothing of course. I cant figure how to turn the dll into a .lib if i need to or not. I notice no .lib file included with the source itself. I was wondering if any insight on this would be available.

Kp

Quote from: TheNewOne on January 02, 2006, 12:14 AM
Ok i did a bit of research on this, finding nothing of course. I cant figure how to turn the dll into a .lib if i need to or not. I notice no .lib file included with the source itself. I was wondering if any insight on this would be available.

A great deal of insight is available, but I'm doubtful whether any of it should be offered.  If you can't even figure out how to get your project to compile with the BNCSutil prototypes and link to its code, I'm highly doubtful you'll be able to accomplish much else on your own.  That said, I'm going to take pity on you and attempt to answer what passes for a question in your post.

You do not turn a dll into a lib, and it really doesn't even make sense to do so.  It's equally nonsensical to include a lib file with the source, because lib files are specific to the Microsoft tools (and I'm not entirely sure that Microsoft hasn't changed the lib file format at least a couple of times by now).  The GNU toolchain would be building archive files (.a).  Other toolchains would probably have yet another format that they'd use to store the object code.  You're probably running afoul of Microsoft's silly idea that you should have a file that looks like an archive that holds stubs for all the DLL's exports.  The BNCSutil.lib pseudo-archive should have been autogenerated at the same time you built BNCSutil.dll.  It's possible you just specified the library search path incorrectly, in which case you would get a link error even if the library existed.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

MyndFyre

Quote from: TheNewOne on January 02, 2006, 12:14 AM
Ok i did a bit of research on this, finding nothing of course. I cant figure how to turn the dll into a .lib if i need to or not. I notice no .lib file included with the source itself. I was wondering if any insight on this would be available.
Why not build it?


OMG.....   I can't see!  It must have been a blinding flash of the obvious!

@TheNewOne: please see my signature.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Kp

Quote from: MyndFyre on January 02, 2006, 11:19 AMWarning: I seem to be on a Kp-style rampage of offering little help and extremely cynical comments.  If your thread is ravaged by me, just hang on and wait for it to all be over.

Hey, I offer plenty of help!  It's just buried in cynical and biting comments.  Anyone with a thick enough skin can dig through all my criticism and find some very helpful gems.  The gems may not always be what they want to hear, though. :)
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Yoni

Quote from: Kp on January 02, 2006, 12:46 PM
Quote from: MyndFyre on January 02, 2006, 11:19 AMWarning: I seem to be on a Kp-style rampage of offering little help and extremely cynical comments. If your thread is ravaged by me, just hang on and wait for it to all be over.

Hey, I offer plenty of help! It's just buried in cynical and biting comments. Anyone with a thick enough skin can dig through all my criticism and find some very helpful gems. The gems may not always be what they want to hear, though. :)
I strongly support those claims. Kp owns.

MyndFyre

Quote from: Kp on January 02, 2006, 12:46 PM
Quote from: MyndFyre on January 02, 2006, 11:19 AMWarning: I seem to be on a Kp-style rampage of offering little help and extremely cynical comments.  If your thread is ravaged by me, just hang on and wait for it to all be over.

Hey, I offer plenty of help!  It's just buried in cynical and biting comments.  Anyone with a thick enough skin can dig through all my criticism and find some very helpful gems.  The gems may not always be what they want to hear, though. :)

Actually, this post was made before I added the Kp part to my signature.  I was directing him to the "reboot yourself" comic.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Yoni

Oh. I did not notice that part in your sig because Dilbert owned my attention span. (Fix)

Zakath

I would just like to reiterate for the record that Kp does, in fact, own.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.