debug build error with xpprt0.lib

Konzeptionelles, Technisches, Termine, Fragen zum Hersteller usw.

Moderator: Moderatoren

Antworten
masian
Rookie
Rookie
Beiträge: 2
Registriert: Di, 07. Jan 2020 6:30

debug build error with xpprt0.lib

Beitrag von masian »

Forgive me as I've only been exposed to xbase++ for less than a week. I'm trying to figure out why I can't debug this code. I'm sure it's something really simple and staring me in the face. Any help is appreciated!

Code: Alles auswählen

#include "dcdialog.ch"
#pragma library("dclipx.lib")
#pragma library("xpprt0.lib")

PROCEDURE Xtest()

LOCAL oTabPage1, oTabPage2, oTabPage3, cDesc := Space(30),;
      aType := {'Star-Trek','Hollywood','Sports','Other'},;
      cType := Space(15), dDateOrig := Date(), dDateAcqu := Date(),;
      nOrigPrice := 0, nApprValue := 0, cMemo := '', ;
      GetList := {}

/* ---- Tab #1 ---- */

@  0,0 DCTABPAGE oTabPage1 CAPTION 'Collection' ;
   SIZE 72,15 PREOFFSET 0 POSTOFFSET 85

@  3,2  DCSAY "Description" GET cDesc SAYRIGHT PARENT oTabPage1

@  5,10  DCSAY "Type" PARENT oTabPage1 SAYSIZE 8

@  6,10 DCCOMBOBOX cType LIST aType SIZE 12,6 PARENT oTabPage1


/* ---- Tab #2 ---- */

@  0,0 DCTABPAGE oTabPage2 CAPTION 'Financial' ;
   RELATIVE oTabPage1

@  4,2 DCSAY "  Original Date" GET dDateOrig  PICT '99/99/9999' ;
   PARENT oTabPage2 SAYRIGHT

@  6,2 DCSAY "  Acquired Date" GET dDateAcqu  PICT '99/99/9999' ;
   PARENT oTabPage2 SAYRIGHT

@  8,2 DCSAY " Acquired Price" GET nOrigPrice PICT '9999.99'  ;
   PARENT oTabPage2 SAYRIGHT

@ 10,2 DCSAY "Appraised Value" GET nApprValue PICT '9999.99'  ;
   PARENT oTabPage2 SAYRIGHT

/* ---- Tab #3 ---- */

@  0,0 DCTABPAGE oTabPage3 CAPTION 'Memo' ;
   RELATIVE oTabPage2

@  5,2 DCMULTILINE cMemo PARENT oTabPage3 SIZE 65,8 ;
   FONT "10.Courier.Bold"

DCREAD GUI ;
   TITLE 'Tab-Page Demo' ;
   FIT ;
   ADDBUTTONS

RETURN
When I debug this in workbench, I get this error:

Code: Alles auswählen

[Hint] : Pbuild.exe project.xpj "/t:Learning004.exe"
[Error] : xpprt0.lib(.\objsWNE.coff\coffSysMap.obj): error ALK2102: unresolved external symbol MAIN
[Fatal Error] : ALK4102: 1 external symbols unresolved
[Hint] : 'alink @C:\Users\masian\AppData\Local\Temp\01077891.tmp' returned error 1
[Hint] : Processing time:      0.22 secs.
[Hint] : DONE
Seems to me the error is with the XPPRT0.LIB library file? Did I make a syntax error somewhere? Thanks in advance! I'm guessing it's something really obvious.
georg
Der Entwickler von "Deep Thought"
Der Entwickler von "Deep Thought"
Beiträge: 2823
Registriert: Fr, 08. Feb 2008 21:29
Hat sich bedankt: 95 Mal
Danksagung erhalten: 13 Mal

Re: debug build error with xpprt0.lib

Beitrag von georg »

Hello, masian -


an Xbase++ program requires a main() function declared. The error ALK2102 points to the fact, that main() is missing. Please check if all necessary files are included in the project. There must be exactly one file that declares the main() function.
Liebe Grüsse aus der Eifel,

Georg S. Lorrig
Redakteur der Wiki des Deutschprachigen Xbase-Entwickler e.V.
masian
Rookie
Rookie
Beiträge: 2
Registriert: Di, 07. Jan 2020 6:30

Re: debug build error with xpprt0.lib

Beitrag von masian »

georg hat geschrieben: Di, 07. Jan 2020 14:19 an Xbase++ program requires a main() function declared. The error ALK2102 points to the fact, that main() is missing. Please check if all necessary files are included in the project. There must be exactly one file that declares the main() function.
Thank you very much for this! I didn't even realize this was a requirement. I'm learning bits and pieces at a time. I will keep this in mind for future code.

Thank you again for the quick reply and I'm very happy to have found this forum!
georg
Der Entwickler von "Deep Thought"
Der Entwickler von "Deep Thought"
Beiträge: 2823
Registriert: Fr, 08. Feb 2008 21:29
Hat sich bedankt: 95 Mal
Danksagung erhalten: 13 Mal

Re: debug build error with xpprt0.lib

Beitrag von georg »

Hello, masian -


the Xbase++ installation contains a directory tree unter documents, Xbase++/source/samples. There are small example files that cover different problems and give you a fast insight into some of the things that an Xbase++ requires. Giving these samples an hour will enhance your experience!

We're glad to help.
Liebe Grüsse aus der Eifel,

Georg S. Lorrig
Redakteur der Wiki des Deutschprachigen Xbase-Entwickler e.V.
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12903
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 19 Mal
Danksagung erhalten: 44 Mal

Re: debug build error with xpprt0.lib

Beitrag von AUGE_OHR »

hi

your Code is from c:\exp20\Samples\Xdemo\Xsample1.prg

Code: Alles auswählen

STATIC FUNCTION XSample_17
/*
TAB-PAGES

This is an example of Tab-Pages using the DCTABPAGE command.  Note
that the second and third tab-pages do not require sizing when they
are created RELATIVE to the previous tab-page.
*/
so it belong to Express++

Question : which Xbase++ Version are you using :?:

Express++ have different LIB for different Xbase++ Version so check your Environment Settings (Path, LIB, INCLUDE)
"which" LIB you can access does \BIN\XppLoad.EXE show you.

have fun
gruss by OHR
Jimmy
Benutzeravatar
Jan
Marvin
Marvin
Beiträge: 14641
Registriert: Fr, 23. Sep 2005 18:23
Wohnort: 49328 Melle
Hat sich bedankt: 21 Mal
Danksagung erhalten: 87 Mal
Kontaktdaten:

Re: debug build error with xpprt0.lib

Beitrag von Jan »

Jimmy,

ist doch längst gelöst. Und hat überhaupt gar nichts mit Versionskonflikten, eXpress++, oder sowas zu tun gehabt.

Jan
Mitglied der XUG Osnabrück
Mitglied der XUG Berlin/Brandenburg
Mitglied des Deutschsprachige Xbase-Entwickler e. V.
Benutzeravatar
AUGE_OHR
Marvin
Marvin
Beiträge: 12903
Registriert: Do, 16. Mär 2006 7:55
Wohnort: Hamburg
Hat sich bedankt: 19 Mal
Danksagung erhalten: 44 Mal

Re: debug build error with xpprt0.lib

Beitrag von AUGE_OHR »

Jan,

this is a English Thread so please answer in English.
gruss by OHR
Jimmy
Antworten