User Lib Help...PLEEEEEAAASSS!!!!!!

Blitz3D Forums/Blitz3D Userlibs/User Lib Help...PLEEEEEAAASSS!!!!!!

Knight #51(Posted 2008) [#1]
Everytime I try to call a function I made, I get an error that sais:"User lib not found." What should I do?? I already made the .dll and .decls file.


Mortiis(Posted 2008) [#2]
Did you put them under Blitz3D\userlib folder?


SLotman(Posted 2008) [#3]
Also when running from the IDE place the dll (if it uses one not included on windows) on the userlibs folder too; when running the EXE, place the dll on the same folder.


Knight #51(Posted 2008) [#4]
Did you put them under Blitz3D\userlib folder?


Yes.

Also when running from the IDE place the dll (if it uses one not included on windows) on the userlibs folder too; when running the EXE, place the dll on the same folder.


Yes.

Still. When I run it, it gives me an error that sais: "User lib not found."


markcw(Posted 2008) [#5]
What are the names of the dll and decls files you are trying to use?


Floyd(Posted 2008) [#6]
I think the IDE only looks for userlibs when it starts. So be sure you have run the IDE after putting the DLL and decls file in the necessary folder(s).

If that's not the problem then try a simple test. Get a DLL/decls set that you are sure works, for example the little MS Visual C/C++ demo that you find on this page. Does that work properly?


Knight #51(Posted 2008) [#7]
What are the names of the dll and decls files you are trying to use?


Why????? Does it matter????????


LineOf7s(Posted 2008) [#8]
Is it a secret?

Perhaps if they're publicly-available then people who are kind enough to attempt to help you with your problem might be able to see if they work correctly on their machines, and perhaps tell you about pitfalls you need to be aware of when using them.


Knight #51(Posted 2008) [#9]
Ok LineOf7s. Thanks :) I'll post the code as soon as I find it :)

[edit] Found it :)

Here is the .decls file:



And here is the .dll file:



Do WHATEVER you want with them. Even sell them if you want, but I know they aren't good enough to sell ;) Any help why that message pops up would be GREATLY appreciated :D


markcw(Posted 2008) [#10]
This bit in the decls looks wrong:
"_GIZMessageBox*2@8"
Should be:
"_GIZMessageBox@8"


Knight #51(Posted 2008) [#11]
Thanks :) But that is not the problem with the error I'm getting.


markcw(Posted 2008) [#12]
This is wrong in the source:
BBDECL void GIZMessageBox(char *messagetodisplay, char *title)
Should be:
BBDECL void GIZMessageBox(const char *messagetodisplay, const char *title)


Knight #51(Posted 2008) [#13]
Thanks markcw :)


markcw(Posted 2008) [#14]
Is it working now then?


Knight #51(Posted 2008) [#15]
Nope :(


markcw(Posted 2008) [#16]
This is wrong, you're missing the hwnd parameter:
MessageBox(messagetodisplay,title,MB_OK);
Try:
MessageBox(0,messagetodisplay,title,MB_OK);


Knight #51(Posted 2008) [#17]
It still sais 'User lib not found'.


Spike314(Posted 2008) [#18]
Are you using .net c++ or c++ 6.0 ?? I no that .net dll's dont work with blitz3d


Knight #51(Posted 2008) [#19]
I have no idea. I made it in Notepad :|


markcw(Posted 2008) [#20]
I don't mean to offend you but are you compiling your C source file as a shared library from a C IDE, or just renaming the .txt extension to .dll? If the latter then that won't work.


Knight #51(Posted 2008) [#21]
No offense taken :) I'm new to C programming. Anyway, I renamed a .txt to a .dll :| I'll try creating one in visual studio and compiling it. How would you sudjest creating and compiling a .dll and .decls??


markcw(Posted 2008) [#22]
To create a .dll, you name your source file with a .c or .cpp extension and then tell your compiler you want to build a dll from that source. The .decls is just a text file for the Blitz IDE to read.

To use Visual Studio, read the tutorial here.
http://msdn.microsoft.com/en-us/library/ms235636(VS.80).aspx


Knight #51(Posted 2008) [#23]
THANKS EVERYBODY!!!!!!!!!!!!!!!! IT WORKED!!!!!!!!!!!