unycorn / lolcode-dot-net

Automatically exported from code.google.com/p/lolcode-dot-net
0 stars 0 forks source link

CAN HAS should support third party Assemblies #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Add something like "CAN HAS Ns1.Ns2.ClassName?"

What is the expected output? What do you see instead?

It is expected to reference that assembly not only with the compiler but in
the code itself.

Instead, I see 'Library "Ns1.Ns2.ClassName" not found.'

What version of the product are you using? On what operating system?

Newest version

Please provide any additional information below.

Y'all should just loop assemblies in the CompilerParameters in the
constructor of LOLProgram and add them to the list. Should just be a 3 line
code addition.

Original issue reported on code.google.com by k...@sitewelders.com on 5 Mar 2008 at 5:26

GoogleCodeExporter commented 8 years ago
From:
            assemblies.Add(Assembly.GetAssembly(typeof(stdlol.core)));
            ImportLibrary("stdlol.core");

To:
            assemblies.Add(Assembly.GetAssembly(typeof(stdlol.core)));
            if (opts.ReferencedAssemblies != null)
            {
                foreach (string assembly in opts.ReferencedAssemblies)
                {
                    Console.WriteLine("Assembly: " + assembly);
                    if (Path.IsPathRooted(assembly))
                    {
                        assemblies.Add(Assembly.LoadFile(assembly));
                    }
                    else
                    {
                        assemblies.Add(Assembly.LoadFile(Path.GetFullPath(assembly)));
                    }
                }
            }
            ImportLibrary("stdlol.core");

Original comment by k...@sitewelders.com on 5 Mar 2008 at 7:21