Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAcharis

Posted 20 December 2012 - 08:27 AM

OK, now the weird thing, I downloaded LUA sources and made a library out of it, then added it exactly as above. It works!

Next, I created a simple library myself from scratch (in case I messed up with the first one somehow) and added it, again, exactly as above (we are talking about minutes time difference, I'm sure I clicked everything identical way). It is not working :)

How come? :D



The full souce code of my library:

main.c
---------
int lib2(int a,int b)
{
return a+b;
}
---------

mylib2.h
---------
int lib2(int a,int b);
---------



EDIT: Solved, it required extern "C".

#2Acharis

Posted 19 December 2012 - 11:22 AM

OK, now the weird thing, I downloaded LUA sources and made a library out of it, then added it exactly as above. It works!

Next, I created a simple library myself from scratch (in case I messed up with the first one somehow) and added it, again, exactly as above (we are talking about minutes time difference, I'm sure I clicked everything identical way). It is not working :)

How come? :D



The full souce code of my library:

main.c
---------
int lib2(int a,int b)
{
return a+b;
}
---------

mylib2.h
---------
int lib2(int a,int b);
---------

#1Acharis

Posted 19 December 2012 - 11:20 AM

OK, now the weird thing, I downloaded LUA sources and made a library out of it, then added it exactly as above. It works!

Next, I created a simple library myself from scratch (in case I messed up with the first one somehow) and added it, again, exactly as above (we are talking about minutes time difference, I'm sure I clicked everything identical way). It is not working :)

How come? :D

PARTNERS