fbpx
× Welcome to the XSharp forum!

Tell us and our members who you are, what you like and why you became a member of this site.
We welcome all new members and hope to see you around a lot!

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

More
3 months 3 weeks ago #1 by Eric Boomsma
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 www.xsharp.info/forum/public-product/608...ject-name-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

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #2 by Chris Pyrgas
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

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #3 by Eric Boomsma
Hi Chris,

In the attachment a module from my application in VO-code.

File Attachment:

File Name: SIKOS Calc...xport.7z
File Size:10 KB


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
Attachments:

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #4 by Chris Pyrgas
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

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #5 by Eric Boomsma
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.

File Attachment:

File Name: SIKOS Calc...Excel.7z
File Size:45 KB


Eric
Attachments:

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #6 by Chris Pyrgas
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

XSharp Development Team
chris(at)xsharp.eu
The following user(s) said Thank You: Eric Boomsma

Please Log in or Create an account to join the conversation.

More
1 month 5 days ago #7 by Eli Brighton
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:
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?

Please Log in or Create an account to join the conversation.

More
1 month 5 days ago #8 by Chris Pyrgas
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.

XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

More
1 month 5 days ago #9 by Eli Brighton
Thank you Chris,
yes this has resolved the issue.

Please Log in or Create an account to join the conversation.