Valhalla Legends Forums Archive | C/C++ Programming | [C++] BNCSUtil Problem

AuthorMessageTime
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.
December 28, 2005, 7:00 PM
Myndfyr
You should #include any appropriate BNCSUtil headers (.h files) and also link against BNCSUtil.lib.
December 28, 2005, 10:55 PM
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..

December 29, 2005, 4:18 AM
Myndfyr
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:
[pre]
/I "C:\Documents and Settings\robp.MINNOW\My Documents\Visual Studio Projects\BNCSUtil\bncsutil-1.1.0\src"
[/pre]
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".
December 30, 2005, 12:35 AM
TheNewOne
Hmm how do i make BNCSUtil.lib for Visual Studio 6's Lib Folder?
I continue to get the error...
[code]
LINK : fatal error LNK1104: cannot open file "bncsutil.lib"
[/code]
January 2, 2006, 1:38 AM
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.
January 2, 2006, 6:14 AM
Kp
[quote author=TheNewOne link=topic=13682.msg140079#msg140079 date=1136182468]
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.
[/quote]

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.
January 2, 2006, 7:37 AM
Myndfyr
[quote author=TheNewOne link=topic=13682.msg140079#msg140079 date=1136182468]
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.
[/quote]
Why not build it?


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

@TheNewOne: please see my signature.
January 2, 2006, 5:19 PM
Kp
[quote author=MyndFyre link=topic=13682.msg140106#msg140106 date=1136222381]Warning: 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.[/quote]

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. :)
January 2, 2006, 6:46 PM
Yoni
[quote author=Kp link=topic=13682.msg140119#msg140119 date=1136227601]
[quote author=MyndFyre link=topic=13682.msg140106#msg140106 date=1136222381]Warning: 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.[/quote]

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. :)
[/quote]I strongly support those claims. Kp owns.
January 2, 2006, 7:36 PM
Myndfyr
[quote author=Kp link=topic=13682.msg140119#msg140119 date=1136227601]
[quote author=MyndFyre link=topic=13682.msg140106#msg140106 date=1136222381]Warning: 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.[/quote]

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. :)
[/quote]

Actually, this post was made before I added the Kp part to my signature.  I was directing him to the "reboot yourself" comic.
January 2, 2006, 7:42 PM
Yoni
Oh. I did not notice that part in your sig because Dilbert owned my attention span. (Fix)
January 2, 2006, 8:57 PM
Zakath
I would just like to reiterate for the record that Kp does, in fact, own.
January 3, 2006, 10:15 PM

Search