Sponsored Content
Top Forums UNIX for Advanced & Expert Users Executing a .dll from a Unix script Post 101206 by BCarlson on Monday 6th of March 2006 06:30:19 AM
Old 03-06-2006
Thanks for the info

Everything I've seen kind of points the same. It may be able to be done but it's not an easy thing to do. Thanks.
 

10 More Discussions You Might Find Interesting

1. Programming

I am porting Dll from NT to Unix, how should I proceed

I am porting Dll from Windows NT to Unix, Could any body pls guide me how should I proceed?? (3 Replies)
Discussion started by: Vipin
3 Replies

2. Programming

Need to port C dll to UNIX

I have source code of a Windows C DLL. It complies properly and works. Now I need to port it to UNIX environment. I need to know if I can create a Dynamic Library or only Static Library is possible in UNIX. In case I can create a Dynamic Library please guide me how to proceed. Or if there... (2 Replies)
Discussion started by: ana_puri
2 Replies

3. What is on Your Mind?

Can we run a dll in unix?

I have created DLLs in c++. Is it possible to run these DLLs in unix so that I can save time converting function/scripts in unix? In this way I can reuse these DLL in Unix. Thanks. (2 Replies)
Discussion started by: alestoquia
2 Replies

4. Programming

Using Windows DLL in UNIX

Hello, I am sorry to bother you all but I am thinking about switching to UNIX and I am a complete novice there. The problem is that I need to call a C++ dll on UNIX platform which was compiled on Windows. I don't have the source code of the dll as well. I just need to call this dll in my C++... (2 Replies)
Discussion started by: clickoo
2 Replies

5. UNIX for Dummies Questions & Answers

Possible to use a Java app with dll files on Unix-systems

Hi... I have build a program for the Velleman K8000 interface card, in java, which works just fine in windows, but now I want to use the program on a Unix-System. Is it possible to somehow convert the dll file to a format that Unix supports, or do I have to find another way? Dll-file:... (3 Replies)
Discussion started by: Scorp-D
3 Replies

6. UNIX for Advanced & Expert Users

Executing SQLPLUS in UNIX Script from JAVA

Hi ALL, I would like to execute one SQL query(ORACLE) in UNIX shell script. For this I used sqlplus in script and tested locally. It worked fine. But my requiremnt is to execute the script from Java. In this case the UNIX part is working but sqlplus is not returning anything The JAVA code used... (0 Replies)
Discussion started by: anooptech
0 Replies

7. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

8. Shell Programming and Scripting

sh script to get unix username of person executing it

Hi, I am writing a script, and I need to incorporate some logic where I can find out the unix username of the person who is executing the script. The issue is , a particular user could have "sesu" ed into a group id. for eg. root, and then executed the script. In that case, instead of root,... (5 Replies)
Discussion started by: neil.k
5 Replies

9. Shell Programming and Scripting

Executing java .jar from UNIX script

I have a .jar placed in my Unix directory. The .jar creates a .csv file .I want to execute the .jar and place the output file in a target Unix directory. The Unix Script is as follows. The issue that i am facing is that the file is not being placed in the REPORTDIR=/cdunix/IQNavigator/wrk instead... (4 Replies)
Discussion started by: pankajkargeti12
4 Replies

10. UNIX for Advanced & Expert Users

Executing of UNIX script using email

Dear Unix Leads, can you please let me know is it possible to execute a shell script in UNIX machine sending an email from outlook or gmail ? or is it possible to generate a token file in UNIX by sending email which we can indirectly use to trigger script your response on this is highly... (5 Replies)
Discussion started by: mirwasim
5 Replies
mono-shlib-cop(1)					      General Commands Manual						 mono-shlib-cop(1)

NAME
mono-shlib-cop - Shared Library Usage Checker SYNOPSIS
mono-shlib-cop [OPTIONS]* [ASSEMBLY-FILE-NAME]* OPTIONS
-p, --prefixes=PREFIX Mono installation prefixes. This is to find $prefix/etc/mono/config. The default is based upon the location of mscorlib.dll, and is normally correct. DESCRIPTION
mono-shlib-cop is a tool that inspects a managed assembly looking for erroneous or suspecious usage of shared libraries. The tool takes one or more assembly filenames, and inspects each assembly specified. The errors checked for include: * Does the shared library exist? * Does the requested symbol exist within the shared library? The warnings checked for include: * Is the target shared library a versioned library? (Relevant only on Unix systems, not Mac OS X or Windows.) In general, only versioned libraries such as libc.so.6 are present on the user's machine, and efforts to load libc.so will result in a Sys- tem.DllNotFoundException. There are three solutions to this: 1. Require that the user install any -devel packages which provide the unversioned library. This usually requires that the user install a large number of additional packages, complicating the installation process. 2. Use a fully versioned name in your DllImport statements. This requires editing your source code and recompiling whenever you need to target a different version of the shared library. 3. Provide an assembly.config file which contains <dllmap/> elements to remap the shared library name used by your assembly to the actual versioned shared library present on the users system. Mono provides a number of pre-existing <dllmap/> entries, including ones for libc.so and libX11.so. EXAMPLE
The following code contains examples of the above errors and warnings: using System.Runtime.InteropServices; // for DllImport class Demo { [DllImport ("bad-library-name")] private static extern void BadLibraryName (); [DllImport ("libc.so")] private static extern void BadSymbolName (); [DllImport ("libcap.so")] private static extern int cap_clear (IntPtr cap_p); } Bad library name Assuming that the library bad-library-name doesn't exist on your machine, Demo.BadLibraryName will generate an error, as it requires a shared library which cannot be loaded. This may be ignorable; see BUGS Bad symbol name Demo.BadSymbolName will generate an error, as libc.so (remapped to libc.so.6 by mono's $prefix/etc/mono/config file) doesn't contain the function BadSymbolName Unversioned library dependency Assuming you have the file libcap.so , Demo.cap_clear will generate a warning because, while libcap.so could be loaded, libcap.so might not exist on the users machine (on FC2, /lib/libcap.so is provided by libcap-devel , and you can't assume that end users will have any -devel packages installed). FIXING CODE
The fix depends on the warning or error: Bad library names Use a valid library name in the DllImport attribute, or provide a <dllmap/> entry to map your existing library name to a valid library name. Bad symbol names Reference a symbol that actually exists in the target library. Unversioned library dependency Provide a <dllmap/> entry to reference a properly versioned library, or ignore the warning (see BUGS ). DLLMAP ENTRIES
Mono looks for an ASSEMBLY-NAME mapping information. For example, with mcs.exe , Mono would read mcs.exe.config , and for Mono.Posix.dll , Mono would read Mono.Posix.dll.config The .config file is an XML document containing a top-level <configuration/> section with nested <dllmap/> entries, which contains dll and target attributes. The dll attribute should contain the same string used in your DllImport attribute value, and the target attribute spec- ifies which shared library mono should actually load at runtime. A sample .config file is: <configuration> <dllmap dll="gtkembedmoz" target="libgtkembedmoz.so" /> </configuration> BUGS
* Only DllImport entries are checked; the surrounding IL is ignored. Consequently, if a runtime check is performed to choose which shared library to invoke, an error will be reported even though the specified library is never used. Consider this code: using System.Runtime.InteropServices; // for DllImport class Beep { [DllImport ("kernel32.dll")] private static extern int Beep (int dwFreq, int dwDuration); [DllImport ("libcurses.so")] private static extern int beep (); public static void Beep () { if (System.IO.Path.DirectorySeparatorChar == '\') { Beep (750, 300); } else { beep (); } } } If mono-shlib-cop is run on this assembly, an error will be reported for using kernel32.dll , even though kernel32.dll will never be used on Unix platforms. * mono-shlib-cop currently only examines the shared library file extension to determine if a warning should be generated. A .so extension will always generate a warning, even if the .so is not a symlink, isn't provided in a -devel package, and there is no ver- sioned shared library (possible examples including /usr/lib/libtcl8.4.so, /usr/lib/libubsec.so, etc.). Consequently, warnings for any such libraries are useless, and incorrect. Windows and Mac OS X will never generate warnings, as these platforms use different shared library extensions. MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details. WEB SITE
Visit http://www.mono-project.com for details mono-shlib-cop(1)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy