WHY IS THIS DLL GIVING A "USERLIB NOT FOUND" ERROR

Blitz3D Forums/Blitz3D Programming/WHY IS THIS DLL GIVING A "USERLIB NOT FOUND" ERROR

JoshK(Posted 2004) [#1]
.dll's, .decls, and .bb:
http://www.leadwerks.com/post/newton.zip


Koriolis(Posted 2004) [#2]
WHY ARE YOU SHOUTING


Koriolis(Posted 2004) [#3]
Now that we are calm and peaceful, let's answer the question.
dunno, maybe because the DLL doesn't export *a single* function named NewtonCreate...
But that's just a wild guess you know.


JoshK(Posted 2004) [#4]
It doesn't matter. If that were the problem, it would say "userlib function now found". I can put any function I want in the .decls file, and if the DLL is there, there shouldn't be a "userlib not found" error.


Koriolis(Posted 2004) [#5]
edited:
bla bla bla...
you'were right the other day, you're immensely funny, in some perverted kind of way. Specially the "LickMyAss" part below. No really.


JoshK(Posted 2004) [#6]
Idiot. Of course it will still be the same error, because Blitz isn't finding the DLL in the first place!

.lib "user32.dll"
LickMyAss()


Run this. It will give a "Userlib function not found" error, because the DLL does not contain the function. I am getting a "Userlib not found" error, which is different. Blitz can't detect the DLL.


Koriolis(Posted 2004) [#7]
Oh, and having an entry point might help too. Despite the error message it's likely that finding the DLL is not the problem, it just can't initialize it.

But what do I know.

And no, despite the subtil and very tempting invitation, I won't lick it.


JoshK(Posted 2004) [#8]
Now we are getting somewhere.


Koriolis(Posted 2004) [#9]
YOU'RE WELCOME GENIUS


VIP3R(Posted 2004) [#10]
I don't know if this might be causing a problem here (I haven't looked properly yet) but this is also worth bearing in mind:


All functions MUST use the _stdcall calling convention.


Oh and if I'm wrong don't even dare yell at me, or you'll be a step closer to getting your 'eyes knocked in' laddie... 'Englishman' style :P - (not all Europeans are pussified, as you so kindly put it)


JoshK(Posted 2004) [#11]
hahaha, you're alright.


Knotz(Posted 2004) [#12]
I looked with depends.exe(from the visual c++ toolkit) at the NDB.dll and it seems that the function names are heavily decorated eg:
?NDB_BodyActive@@YAHH@Z instead of ?NDB_BodyActive.

Using a .def file and enclose all exported function names between extern "C" {...} should solve it. If you are using VC++ or something simular to build the NDB dll.


JoshK(Posted 2004) [#13]
I didn't write the DLL. :\

I am going to kill everyone.


Koriolis(Posted 2004) [#14]
Yeah, kill that damn people that for some weird reason still try to help you, attempting to decipher your problem from your one line post that doesn't tell where's the DLL is coming from (nor, provided you know Newton, if it's the original DLL or some wrapper made by you).

And incidentally, calling them "Idiot" for not wining at the first try at your guessing game.

Also the fact you didn't write the DLL doesn't even mean you didn't build it and haven't access to the source.

I love all your posts halo.

BTW, I know I should be blamed for feeding the troll, but I was in the right mood for it :)


Clarks(Posted 2004) [#15]
normally when blitz gives that error, you need to save your file and place the dll in the same location as your source file. then blitz should be able to find the dll. this normally happens when you have a dll that calls another dll.