Page 2 of 2
Compile to One_Big.exe
Posted: Tue Jul 14, 2020 2:43 pm
by Chris
Hi Joe,
What warnings are they? Maybe multiple defined functions/methods?
Compile to One_Big.exe
Posted: Wed Jul 15, 2020 6:07 am
by OhioJoe
Chris, here are the more frequent warnings, all of which did not appear then I was compiling the several XPorter-converted applications
warning XS9032: This entity type cannot return a value. Return value ignored
CONSTRUCTOR()
LOCAL strucSelfPtr AS StructureSelf
RegisterAxit(SELF)
strucSelfPtr := MemAlloc(_SIZEOF(SelfPtr))
strucSelfPtr.PtrSelf := GCHandle.ToIntPtr( GCHandle.Alloc( SELF ) )
ptrSelfPtr := strucSelfPtr
RETURN SELF // this is the line refererenced by the error
warning XS0165: Use of unassigned local variable 'nReturn'
FUNCTION Chris( nSpot AS dWord ) AS INT STRICT
LOCAL nReturn as int
DO CASE
CASE nSpot = 1
nReturn := 200
CASE nSpot = 2
nReturn = 400
ENDCASE
RETURN nReturn // this is the line referenced by the error
I'm guessing the compiler doesn't like conditionally-assigned variables
And I have several of these:
warning XS0618: 'XSharp.RT.Functions.InCollect()' is obsolete: ''InCollect()' is not supported'
Here's a place where we close all the globally-opened files and close them before running a process that requires exclusive use
oXGlobalFiles := XGlobalFiles{}
oXGlobalFiles:CloseAllGlobalFiles()
oXGlobalFiles:Destroy()
IF ! InCollect() /// this is he line referenced by the error
oXGlobalFiles := NULL_OBJECT
ENDIF
Thank you, Chris
Compile to One_Big.exe
Posted: Wed Jul 15, 2020 6:56 am
by robert
Joe,
VOXPorter has added some warning numbers to the list of warnings that should be ignored.
Most likely you did not copy these warning numbers to your new "Big Exe" app.
Robert
Compile to One_Big.exe
Posted: Wed Jul 15, 2020 8:08 am
by Chris
Hi Joe,
As Robert said, that's because the original project had some warnings disabled. To add them tot eh new one, please go to the old one, go to application properties, Compiler tab page and copy the values found in the first large edit box, then paste this text to the same box in the new big app properties.
But regarding this one:
OhioJoe wrote:
warning XS0165: Use of unassigned local variable 'nReturn'
FUNCTION Chris( nSpot AS dWord ) AS INT STRICT
LOCAL nReturn as int
DO CASE
CASE nSpot = 1
nReturn := 200
CASE nSpot = 2
nReturn = 400
ENDCASE
RETURN nReturn // this is the line referenced by the error
I'm guessing the compiler doesn't like conditionally-assigned variables
the compiler warns you that the variable _might_ have not been assigned. In case nSpot has neither the value of 1 or 2, then nReturn is indeed not assigned a value.
Compile to One_Big.exe
Posted: Wed Jul 15, 2020 2:26 pm
by OhioJoe
Thank you, Chris and Robert. Eventually I will clean up everything but starting tomorrow I'll post the "big_exe" on the website and server, where it will be accessible to dozens of organizations; I've done enough testing to have confidence in the conversion. Congratulations, guys!
Compile to One_Big.exe
Posted: Wed Jul 15, 2020 8:47 pm
by Chris
Hi Joe,
That's great to hear, thanks for telling s about it! What kind of application is it, if you don't mind talking about it?
Compile to One_Big.exe
Posted: Sat Jul 18, 2020 2:59 am
by OhioJoe
Chris, since you asked ...
The main application,
Filpac has been used by about 300 political campaigns, trade associations and Political Action Committees in the US. It's basically a CRM for public committees, with specialized fund-accounting features to help organizations comply with the myriad of Federal and state rules.
I've also used the controls originally developed for the Filpac application to create solutions for the trucking and utility-contractor industries. A couple of years ago we tried developing a medical app but we couldn't find reliable development help. So now I'm thinking of a collaboration. In the US there's room for a solid, reasonably-priced medical app.
It all started in Clipper. There's still at least one fairly sizable company (200 paychecks) deploying an unsupported instance of Server 2003 so they can continue to use our old Clipper app, which includes one DBF that's grown to at least 4 million records. For me the lesson is that customers value things that work. As the saying goes: "If it ain't broke, don't fix it"
Lots of opportunities in this country for those who can deliver quality and reliability. (And figure out how to sell it.)
Compile to One_Big.exe
Posted: Sat Jul 18, 2020 7:37 am
by Chris
Hi Joe,
Thanks for letting us know! As you imagine, it's great pleasure to hear of systems written or ported in X# being very successful! Wish you all the best for your current and future applications!