Why will this not compile?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Why will this not compile?

Post by t57042 »

Code: Select all

#include "minigui.ch"
//---------------------------------------------------------
Function Main()
a=System.Clipboard
 ? a
wait 
 Return
I want to read a string from the clipboard.
When compiling i get :unresolved external 'HB-FUN-RETRIEVETEXTFROMCLIPBOARD' link error

When I try to compile the demo program in the sample\basic\clipboard directory - same problems

Richard
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Why will this not compile?

Post by Rathinagiri »

For me this works fine. Which version you are using?

Code: Select all

#include "minigui.ch"
//---------------------------------------------------------
Function Main()
a=System.Clipboard
msginfo( a )
Return
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Re: Why will this not compile?

Post by t57042 »

Build 99 (HMG 1.9 Extended Edition) Published.

Windows 7
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Why will this not compile?

Post by Rathinagiri »

Oh.

In HMG Extended, these are the functions:

CopyToClipboard(cText) store cText in Windows clipboard

RetrieveTextFromClipboard() ->cText retrieve text from Windows clipboard

Function CopyRtfToClipboard(cRtfText) store cRTFText in Windows clipboard
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Why will this not compile?

Post by esgici »

IMO confusing is GUI / Console difference :(

How

#include <hmg.ch>

can be exist together ? and WAIT :?:

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Re: Why will this not compile?

Post by t57042 »

Code: Select all

#include "minigui.ch"

//---------------------------------------------------------
Function Main()
a=RetrieveTextFromClipboard()
 ? a
wait 
 Return
still the same link error
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Why will this not compile?

Post by esgici »

t57042 wrote: still the same link error
"Together" meant "into same program"

If your program is a GUI application, extract ? and WAIT; if your program is a console application extract #include ...

And I guess RetrieveTextFromClipboard() too is a MiniGUI function, so in a console program it haven't place.

As a result, use MsgInfo() instead of ? and WAIT; f.e. try sample of Rathinagiri.

By the way, address of mail group of Minigui Extended is :http://tech.groups.yahoo.com/group/harbourminigui/

And address of mail group of Harbour (as mentioned early) is http://groups.google.com/group/harbour-users

Each mail group may be more useful to you for their individual field.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Why will this not compile?

Post by esgici »

Hi Richard
t57042 wrote: When I try to compile the demo program in the sample\basic\clipboard directory - same problems
FYI :

C:\MiniGUI\SAMPLES\BASIC\CLIPBOARD\demo.prg ( of course, without any intervention / modification )

compiled via

C:\MiniGUI\SAMPLES\BASIC\CLIPBOARD\Compile.bat

and run without any problem.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Why will this not compile?

Post by dhaine_adp »

Code: Select all

a=System.Clipboard
Isn't it that this statement will test for equality? The line is supposed to be: a := System.Clipboard

Or he needs to re-install hmg39.

--
Danny
Regards,

Danny
Manila, Philippines
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Why will this not compile?

Post by esgici »

Hi Danny, how are you ?
dhaine_adp wrote: Isn't it that this statement will test for equality?
http://www.itlnet.net/programming/progr ... 1ae68.html

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Post Reply