References

This forum is meant for questions and discussions about the X# language and tools
Post Reply
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

References

Post by FFF »

Spurred on by recent successes, i wanted to move another app from VN to X#, but I think there's some misunderstanding from my side.

Made a new project in Xide, imported a library (viaef), which references some other libs. Instead of importing viaefs for these, too (in other projects), i used "browse" and added the dlls. On compile, i get some errors like
error VN4004: unknown function or method: 'WriteLog' 221,3 SCF_Modul_ELS.prg SCF_Modul_ELS:FillFromIni
If i point onto WriteLog in the code, i can "goto definition from metadata", but nothing happens.
The referecend dlls are "x#", the calling dll is (still) VN, but that shouldn't pose this problem??

I expect to workaround by fetching the source and bind the libs in this project, but i'd like to understand, why the above fails.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

References

Post by Chris »

Hi Karl,

"error VNxxxx" means that you are compiling this particular app with vulcan, not with X# :)
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

References

Post by FFF »

Chris wrote: "error VNxxxx" means that you are compiling this particular app with vulcan, not with X# :)
Indeed ;) - and switching to X#/VN fixed this error.
But i have VN still installed, and thought mixing different dll-languages is possible?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

References

Post by Chris »

Karl,

Most probably it's because vulcan does not "know" how X# emits functions and globals. If you used fully qualified names for them (like MyLibrary.Functions.WriteLog()), then it should work.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

References

Post by FFF »

Chris,
now it get's a bit strange. Just started my machine, read your notice, started Xide, changed my dll back to "VN", compile - and all these errors are gone, apart from "error VN4011: 'FileSpec' : unknown type (are you missing an assembly reference?) 15,21 S4File.prg S4File:S4File". Had a look, and changed to Vo.Filespec - compile, and now the errors of yesterday are back ;)

But you hit the nail on his head, as usually, qualifiying the names did help.
Curiosity satisfied, now switched back to X#/VN language, removed the additions and went on.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

References

Post by Chris »

Hi Karl,

Most likely the vulcan compiler stopped reporting errors when it reached the unknown FileSpec class. When you adjusted this, it then went on trying to compile and found and reported the next issues it found.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply