Forums

problem using dll with namespace compiled with cobra

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

problem using dll with namespace compiled with cobra

Postby gauthier » Sun Dec 07, 2008 5:52 pm

How to reproduce:

file: somenamespace.cobra
namespace SomeNamespace
class SomeType
pass


compile with
Code: Select all
cobra -ert:yes -t:lib somenamespace.cobra


file: test.cobra
use SomeNamespace

class Program
def main is shared
t = SomeType()


compile with
Code: Select all
cobra -ert:yes test.cobra


I get verbose internal error (attached:
log.zip
error log
(5.01 KiB) Downloaded 451 times
)
gauthier
 
Posts: 116

Re: problem using dll with namespace compiled with cobra

Postby Charles » Sun Dec 07, 2008 6:02 pm

We have a ticket for this already: http://cobra-language.com/trac/cobra/ticket/3

Are you able to work around this by leaving the -ert:yes off of the library build?

Another workaround would be to leave -ert:no and later use ILMerge to combine everything when it comes time to deliver your application.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: problem using dll with namespace compiled with cobra

Postby gauthier » Sun Dec 07, 2008 6:14 pm

Thanks, the work-around is working :)

I just need to keep Cobra.Lang.dll arround my binaries
gauthier
 
Posts: 116

Re: problem using dll with namespace compiled with cobra

Postby Charles » Sun Dec 07, 2008 6:18 pm

If you're using Cobra out of the source code repository, you shouldn't need to. The "install-from-workspace" script installs Cobra.Lang into the GAC where it can be found automatically. See http://cobra-language.com/trac/cobra/wiki/HowToInstallFromSource.

If you're using the latest Cobra and not able to build your project without copying the Cobra.Lang.dll to your directory, please let me know.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: problem using dll with namespace compiled with cobra

Postby gauthier » Mon Dec 08, 2008 12:36 am

Well, the fact that the install script do so in a fixed location was the reason I did not use it.

So I'll register the dll to the gac manually
gauthier
 
Posts: 116

Re: problem using dll with namespace compiled with cobra

Postby Charles » Mon Dec 08, 2008 12:41 am

I'll accept a patch that prompts the user for the location. :-)

Something like:
Install to directory [C:\Cobra\Cobra-0.8.1-post]: _
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 58 guests