Undefined reference to `MCIWndCreateA'

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Undefined reference to `MCIWndCreateA'

Post by cocoking »

When I added the following codes to my existing software:

DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 200 ;
HEIGHT 200 ;
MAIN;
TITLE 'HMMGC System'

DEFINE MAIN MENU
POPUP 'Test'
ITEM 'Disable button' ACTION Form_1.Button_1.Enabled := .f.
ITEM 'Enable button' ACTION Form_1.Button_1.Enabled := .t.
END POPUP
END MENU
@ 70,70 BUTTON Button_1 PICTURE "button.bmp" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')

END WINDOW
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1

In compiling, I get this:

c:/hmg/lib/libhmg.lib(c_media.o):c_media.c:(.text+0x6a3): undefined reference to `MCIWndCreateA'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1

Any idea what library I need to add?

By the way, if libraries are named *.a, compiler/linker can't seem to find them.
I had to rename them to *.lib.

I'm using HMG 3.0.26 (2010.03.26)

TYVM.
User avatar
mustafa
Posts: 1177
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Undefined reference to `MCIWndCreateA'

Post by mustafa »

Hola cocoking
He compilado tu codigo solo añadiendo al principio:
#include "minigui.ch"
function main
y al final:
RETURN NIL
y sin ningun problema
Te mado el ejecutable y el prg en un Zip
Yo tengo la última versión de HMG 3.0.35
Saludos
*--------------- Google -------------------*
Hello cocoking
I compiled your code by adding only the beginning:
#include "minigui.ch"
function main
and finally:
RETURN NIL
and without any problem
I put the executable and a Zip prg
I have the latest version of HMG 3.0.35
Regards
Mustafa
Attachments
Sample.zip
(698.07 KiB) Downloaded 282 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Undefined reference to `MCIWndCreateA'

Post by esgici »

Hi cocoking
cocoking wrote: Any idea what library I need to add?
Every undefined reference message doesn't meant missing library :(
cocoking wrote: By the way, if libraries are named *.a, compiler/linker can't seem to find them.
I had to rename them to *.lib.
Very strange :o

Anyway you don't need rename library files .a to.lib :?

Are you sure your HMG installation and build script (build.bat) are correct :?:

If not, please remove everything (with uninstall HMG) and make a clean install.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Re: Undefined reference to `MCIWndCreateA'

Post by cocoking »

Thank you for your replies, Mustafa and esgici.

I removed old version and installed 3.0.35, accepting the default settings (folders, etc).
Then, I compiled some HMG samples. Indeed, all tested samples compiled successfully.

But with my program, I still get errors and I am still debugging...

Thanks for the help.
Post Reply