Jump to content
  • Advertisement
Sign in to follow this  
Sephirox

Beginning AngelScript

This topic is 4830 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi guys... im interested in starting to use angel script. one thing i know for sure is that i want to use angelscript through a dynamic dll that i load myself. ive been experimenting with vc++6.0 to compile this dll, but all i get is errors when i try to import from them. i just need help to build the dynamic dll from the sources. thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
To build the DLL you must define the preprocessor flag ANGELSCRIPT_EXPORT so that the functions are properly exported.

You'll also have to add the DllMain() function as defined by Microsoft.

You can probably use the already created dll project for MSVC6, though I haven't tested this in a very long time so it might need a few minor adjustments. You'll find this project in the /sdk/angelscript/projects/msvc6/dll/ folder. You'll have to compile the static library first (or alternatively add all the library source files to the dll project).

When linking with the dll, you'll have to define the flag ANGELSCRIPT_DLL_LIBRARY_IMPORT in the project settings, in case you're linking with the automatic dll import lib. If you manually load the dll and find the function pointers, you should define the flag ANGELSCRIPT_DLL_MANUAL_IMPORT so that the declarations in AngelScript doesn't interfere with your function pointers.

Regards,
Andreas

Share this post


Link to post
Share on other sites
thx for the quick reply.
i did everything u said, but its still not working!!:(
im nicely stuck now...any more sugestions?

Share this post


Link to post
Share on other sites
there is no error message - the dll gets made.
when i run the program to test the dll, the dll loads fine.
when i get a function out of the dll, it is null.
so, the dll gets made, but the functions are not in it...
a step by step guide from start to end is what i need i think...

thanks

Share this post


Link to post
Share on other sites
It would seem that your dll doesn't export the functions you want, or perhaps it exports them with a different name than you expect. You can verify the exported function names with the tool Depends, that you should find on the start menu under Microsoft Visual C++ Tools.

I also agree with Rain Dog. You really ought to read up on the subject of compiling dlls as well as using them. MSDN is a good place to start: MSDN library online. You should also be able to find good articles by searching on Google.

I just compiled the dll using the MSVC6 project that I distribute with the AngelScript SDK, and everything seems to be fine. I verified the exported functions with Depends, just to make sure. Why aren't you using this project?




Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!