IP Publica

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2065
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: IP Publica

Post by AUGE_OHR »

hi,
andyglezl wrote: Fri Nov 12, 2021 4:54 am Did you include the MainIPPub.hbp file?
I tried it a while ago and it worked.
thx for Answer.

i have assign *.HBP to IDE (Unicode) so i "just" dblclick on *.HBP and press F5

Code: Select all

C:\hmg.3.4.4\IDE\IDE.exe "%1"
IHMO inside *.HBP is "only" MainIPPub.prg and *.HBC is empty

what do i miss :idea:
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: IP Publica

Post by andyglezl »

Lo siento, yo nunca he utilizado el IDE...
Simplemente compilo así: G:\MiApp> C:\HMG\3.4.4\Build MainIPPub
*---------------------------------------------------------------------------------------
Sorry, I've never used the IDE ...
I just compile like this: G:\MiApp> C:\HMG\3.4.4\Build MainIPPub

imagen_2021-11-12_174752.png
imagen_2021-11-12_174752.png (5.51 KiB) Viewed 698 times
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
AUGE_OHR
Posts: 2065
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: IP Publica

Post by AUGE_OHR »

hi,

have open CMD box and type

Code: Select all

..\..\build MainIPPub.hbp
but i still got Error ( now with "W@20" )
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
R:/Temp/hbmk_0joemu.dir/MainIPPub.o:MainIPPub.c:(.text+0xaa): undefined reference to `URLDownloadToFileW@20'
collect2.exe: error: ld returned 1 exit status
hbmk2[MainIPPub]: Error: Running linker. 1
gcc.exe R:/Temp/hbmk_0joemu.dir/MainIPPub.o R:/Temp/hbmk_0joemu.dir/hbmk_xesgsy.o c:/hmg.3.4.4/0/IPPUBLIC/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lini -lreport -lhfcl -lmsvfw32 -lvfw32 -lhbmysql -lmysql -lhbfimage -lhbpgsql -lsddmy -lhbvpdf -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lhbssl -llibeay32 -lssleay32 -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -oMainIPPub.exe -Lc:/hmg.3.4.4/harbour/lib/win/mingw -Lc:/hmg.3.4.4/lib
hm ... which Version do you use : HMG 3.4.4 or 3.5 :?:
have fun
Jimmy
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: IP Publica

Post by andyglezl »

Tengo HMG 3.4.4

:? mmmmm... Quizá
In C:\HMG\3.4.4\ existe el "hmg32.hbc", tiene est´s Libs ?
*-----------------------------------------------------------------------
I have HMG 3.4.4

:? mmmmm ... Maybe
In C:\HMG\3.4.4\ there is the "hmg32.hbc", do you have these Libs?

imagen_2021-11-12_180612.png
imagen_2021-11-12_180612.png (11.31 KiB) Viewed 694 times
Andrés González López
Desde Guadalajara, Jalisco. México.
edk
Posts: 917
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: IP Publica

Post by edk »

AUGE_OHR wrote: Fri Nov 12, 2021 11:55 pm hi,

have open CMD box and type

Code: Select all

..\..\build MainIPPub.hbp
but i still got Error ( now with "W@20" )
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
R:/Temp/hbmk_0joemu.dir/MainIPPub.o:MainIPPub.c:(.text+0xaa): undefined reference to `URLDownloadToFileW@20'
collect2.exe: error: ld returned 1 exit status
hbmk2[MainIPPub]: Error: Running linker. 1
gcc.exe R:/Temp/hbmk_0joemu.dir/MainIPPub.o R:/Temp/hbmk_0joemu.dir/hbmk_xesgsy.o c:/hmg.3.4.4/0/IPPUBLIC/_temp.o -pthread -static-libgcc -static-libstdc++ -static -lpthread -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lini -lreport -lhfcl -lmsvfw32 -lvfw32 -lhbmysql -lmysql -lhbfimage -lhbpgsql -lsddmy -lhbvpdf -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lhbssl -llibeay32 -lssleay32 -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -oMainIPPub.exe -Lc:/hmg.3.4.4/harbour/lib/win/mingw -Lc:/hmg.3.4.4/lib
hm ... which Version do you use : HMG 3.4.4 or 3.5 :?:
I think You need urlmon lib, try to add "-lurlmon" into MainIPPub.hbp

Code: Select all

#harbour options:
-w3

#hbmk2 options:
-lurlmon

#sources:
MainIPPub.prg
User avatar
AUGE_OHR
Posts: 2065
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: IP Publica

Post by AUGE_OHR »

hi,
edk wrote: Sat Nov 13, 2021 3:21 am I think You need urlmon lib, try to add "-lurlmon" into MainIPPub.hbp

Code: Select all

#harbour options:
-w3

#hbmk2 options:
-lurlmon

#sources:
MainIPPub.prg
YES :D

after add it that Way it work for me
but i´m confused about Syntax

i do use Libs= and LibPath= in *.HBC
"where" does (lib)urlmon(.a) come from ?

THX, Jimmy
have fun
Jimmy
edk
Posts: 917
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: IP Publica

Post by edk »

AUGE_OHR wrote: Sat Nov 13, 2021 5:27 am YES :D

after add it that Way it work for me
but i´m confused about Syntax

i do use Libs= and LibPath= in *.HBC
"where" does (lib)urlmon(.a) come from ?

THX, Jimmy
I think when you use the IDE the library entries in the .hbp file are ignored. So they must be declared in .hbc, try this .hbc:

Code: Select all

libs=urlmon
On the other hand, if you want to batch compile via build.bat then you have to declare the libraries in .hbp or specify it on the command line, or if you use .hbc then this .hbc file is also given on the command line.
Examples:

1. When .hbp contains references to a library:

Code: Select all

#hbmk2 options:
-lurlmon

#sources:
ImageFromWeb.prg

Code: Select all

build.bat ImageFromWeb.hbp
2. When the .hbp does not contain a reference to the library, the .hbc file is missing.

Code: Select all

build.bat ImageFromWeb.hbp -lurlmon
3. When .hbp does not contain references to the library, but in the .hbc file they are declared.

Code: Select all

build.bat ImageFromWeb.hbp ImageFromWeb.hbc
(lib)urlmon(.a) come from "C:\hmg.3.4.4\MINGW\i686-w64-mingw32\lib\liburlmon.a"
Post Reply