xsharp.eu • Error XS7038 Failed to emit module '(Project name)' - still?
Page 1 of 1

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 11:43 am
by Intexso
Hi,

After compiling my application which uses '', I got the error: Error XS7038 Failed to emit module '(Project name)'.

I read the topic about this form a few months ago https://www.xsharp.eu/forum/public-prod ... xsc-1#4373.

In my code (after using xporter) there are several rows with:
oBorder := oBorders:Item[xlEdgeLeft]
The given solution was to remove the Item part. I did that and the error disappeared!

I thought I read that this problem was fixed, that's why I report it here...

Eric

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 1:14 pm
by Chris
Hi Eric,

Sorry about that, the original problem was fixed indeed, but apparently there is some different similar variation that still causes the compiler to crash. Can you please post a complete example? What is the oBorders var declared as?

Chris

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 1:29 pm
by Intexso
Hi Chris,

In the attachment a module from my application in VO-code.
SIKOS Calculatie Export Excel - ExcelExport.7z
(10.45 KiB) Downloaded 153 times
In the METHOD MaakRanden you see my orginal code.

oBorder is strongly typed as ExcelBorder. ExcelBorder is in an library generated with the automation server (with prefix Excel).

Eric

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 2:26 pm
by Chris
Hi Eric,

Thanks, but unfortunately I cannot reproduce the error, I ported this code and it seems to be working fine in X#. Are you sure you are using the latest build? Any chance you could zip and send me the X# project? Maybe there's something else getting in the way... It's also a possibility that the compiler has a glitch with the CLR2 dll also.

Chris

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 2:40 pm
by Intexso
Hi Chris,

I have from XIDE build 1.14 of July 2018
And Xporter version 2.0.0.5

This came with the XSharp Bandol Beta 5 (Public) . After that I entered the fox-program. Because it seemed to me that the last public version was the same as the fox-version I haven't updated.

In the attachment you will find the X# Code. But in this code I have manually deleted the Item text.
SIKOS Calculatie Export Excel.7z
(45.24 KiB) Downloaded 154 times
Eric

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Thu Sep 20, 2018 3:26 pm
by Chris
Thanks! Unfortunately I still could not reproduce the problem after changing the code to use "Item", not even after I used the CLR 2 version of the interop dll. Maybe it was something else that caused the problem that I cannot think about right now. Anyway, if this error ever happens again please let us know and we will further investigate.

Chris

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Wed Dec 12, 2018 12:02 am
by elibrighton
Hi,
I am also getting the XS7038 Failed to emit module '(Project name)' error for a project ported from Vulcan.Net to X#.

the line in question seems to be:

Code: Select all

LOCAL DIM abDrive[MAXDRIVENAME] AS BYTE
LOCAL testPsz AS PSZ

testPsz := PSZ(_CAST, @abDrive[1])
Could you please offer assistance with how to resolve this?

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Wed Dec 12, 2018 12:25 am
by Chris
Hi, please just set the "Allow unsafe code" project option to True, and the problem should go away. This one is a known problem, should be fixed in one of the next releases.

Error XS7038 Failed to emit module '(Project name)' - still?

Posted: Wed Dec 12, 2018 12:28 am
by elibrighton
Thank you Chris,
yes this has resolved the issue.