Compiling and having dllnotfound error

112 views
Skip to first unread message

gurcand...@gmail.com

unread,
Sep 3, 2014, 10:20:56 AM9/3/14
to si...@googlegroups.com
Hi all,

I'm trying to use SIPek in windows. My application runs on windows just find. However, I need to develop the same program in Linux environment too. I'm using mono develop and using the same files in windows. When I try to compile(with tons of debug points to determine the source of error) I got this: "Sipek.Sip.pjsipRegistrar.Instance    System.DllNotFoundException: pjsipDll.dll "

I downloaded pjsip from the website then I did the steps that used on linux like ./configure, make dep, make clean and make. They all went just fine. But when I do this step

"Compile pjsipDll.cpp:

Create new folder for pjsipDll project. Copy pjsipDll source files into that folder and compile:

Compile pjsipDll.cpp

g++ -c -fPIC -I "../pjsip/include/" -I "../pjlib/include" -I "../pjlib-util/include" -I "../pjmedia/include" -I "../pjnath/include" -shared -o pjsipDll.o pjsipDll.cpp"

I got the error that pjsipDll.cpp not found. I found the .cpp file in sources and also found pjsipDll.h file and downloaded them. I did create a folder named 'SOURCES' and put both files inside of it. When I run the compile code(starting with the 'g++ -c -fPIC....') I got tons of error in terminal. I also created new c++ project in mono develop and used the same header and cpp file and it gives 80 error. I can't get over that step. If I just compile the code maybe I can create my libpjsipDll.so file so I can use it on mono develop and run my project.

Finally, I'm using version 0.9 and it's an old project needed to be done in linux with the same version as well. If someone can give me version 0.9 libpjsipDll.so file and tell me where should I put that file in order to run my application. I also did change

"     #region Dll declarations

#if LINUX
        internal const string PJSIP_DLL = "libpjsipDll.so"; 
#elif MOBILE
        internal const string PJSIP_DLL = "pjsipdll_mobile.dll"; 
#elif TLS
        internal const string PJSIP_DLL = "pjsipdll_tls.dll"; 
#else
        internal const string PJSIP_DLL = "pjsipDll.dll";
#endif
"

It seems, it never goes in if LINUX. I did change the last entry as libpjsipDll.so and then it will give me the same error in the beginning for libpjsipDll.so file. However, I used 0.44 .so file and got no positive results.

I really need getting that .so file for version 0.9 or compiling code with some kind of workaround. Lastly, I did use the latest pjsip library and try to compile it as well and getting the same errors in return.

For windows I'm using Visual Studio 2010 and everything works fine and Linux I'm using Mono Develop 4.0.12. My pjsip library 0.9.

I hope someone could help me and thanks!

ingf...@gmail.com

unread,
Dec 30, 2014, 5:48:26 PM12/30/14
to si...@googlegroups.com, gurcand...@gmail.com
Did you find the solution? I have the same problem, everything compiles great! But when it hits the 

    private pjsipRegistrar()
    {
    onRegStateCallback(rsDel);
    }

Sipek.Sip.pjsipRegistrar.Instance    System.DllNotFoundException: libpjsipDll.so

did you find the problem?

Where did you copy de .so file?

Thanks

gurcand...@gmail.com

unread,
Dec 31, 2014, 9:29:35 AM12/31/14
to si...@googlegroups.com, gurcand...@gmail.com, ingf...@gmail.com
Hi, I'm very sorry to say this but I couldn't find anything regarding with this problem. I manage to compile pjsip library with related files and changed some of the .c and .cpp files for no errors. However, after I compiled I have the 1-2MB .so file and I already put it under related folders and looked with grep to check if I did it correctly. After that I just opened mono and still I'm in the same line of code that says .so file not found. My hands are full but I may have a legit solution to bypass this situation. Since sipek uses pjsip source codes for building c# api, I can do the same with original pjsip files and build it under mono for .so file and then use it on my project same as sipek uses. Since I successfully registered my account in command line example of pjsip, I can now try to add some basic codes to just export it as a .so file and write simple functions as sipek to handle with data. After that everything is easy. But I couldn't find anytime to try it. When I try it, I'll post the result. If you want to try to make your own simple api, you can use cpp api of pjsip source. Since it's the same as c, I believe you can do it easily. Here is how to build simple dll from unmanaged code and use it on c# if you don't know how. http://www.codeproject.com/Articles/9826/How-to-create-a-DLL-library-in-C-and-then-use-it-w

I just have one simple request from you, if you find anything about this please let me know too. I hope you will find someway to make it run. Please let me know about the result of building api if you willing to try.

I wish you a good year.

Best.

31 Aralık 2014 Çarşamba 00:48:26 UTC+2 tarihinde ingf...@gmail.com yazdı:

gokber...@gmail.com

unread,
Mar 1, 2016, 11:04:08 AM3/1/16
to SIPek, gurcand...@gmail.com, ingf...@gmail.com

Hello , I have same problem and I am still trying to solve it.I downloaded ubuntu last version 15.04 but still no progress.İf you guys made any  , could you please let me know how ? .

Thank you very much..
31 Aralık 2014 Çarşamba 16:29:35 UTC+2 tarihinde gurcand...@gmail.com yazdı:
Reply all
Reply to author
Forward
0 new messages