Page 1 of 1

Undefined reference to `MCIWndCreateA'

Posted: Tue Jul 20, 2010 7:02 am
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.

Re: Undefined reference to `MCIWndCreateA'

Posted: Tue Jul 20, 2010 10:19 am
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

Re: Undefined reference to `MCIWndCreateA'

Posted: Tue Jul 20, 2010 10:56 am
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

Re: Undefined reference to `MCIWndCreateA'

Posted: Wed Jul 21, 2010 12:54 pm
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.