xsharp.eu • References
Page 1 of 1

References

Posted: Tue Dec 01, 2020 8:32 pm
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.

References

Posted: Tue Dec 01, 2020 8:58 pm
by Chris
Hi Karl,

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

References

Posted: Tue Dec 01, 2020 11:25 pm
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?

References

Posted: Wed Dec 02, 2020 6:49 am
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.

References

Posted: Wed Dec 02, 2020 8:12 am
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.

References

Posted: Wed Dec 02, 2020 10:00 am
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.