Forums

Reference a system dll

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

Reference a system dll

Postby ericzbeard » Sun Mar 09, 2008 6:19 pm

How do you compile something that references a system dll?

:) cobra -d -c CobraSvc1.cobra
CobraSvc1.cobra(5): error: Cannot locate namespace "System.Configuration.Install".
Compilation failed - 1 error, 0 warnings


:) cobra -d -r:System.Configuration.Install -c CobraSvc1.cobra
cobra: error: Cannot find "System.Configuration.Install" as a file.
Run Cobra without options to get full usage information.
ericzbeard
 
Posts: 2

Re: Reference a system dll

Postby Charles » Sun Mar 09, 2008 8:10 pm

Sorry about that. When I wrote the code to read DLLs, I had so many problems with "System.Configuration" that I added if statements to skip it. I had these problems even when not explicitly using System.Configuration! It was really frustrating.

Then I forgot about all of that until your post tonight. :D

I have removed those guards and everything works great on Microsoft .NET 2.0 and Novell Mono 1.9 preview 4.

I tested commands like:
Code: Select all
cobra -r:System.Configuration -v:2 hello.cobra
cobra -r:System.Configuration.Install -v:2 hello.cobra

This means that you'll have to use Cobra from the repository, but it's quite easy to build. Start at http://cobra-language.com/source/

If you have further problems, this is the right place to post.


-Chuck
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 128 guests

cron