October 30, 2025, 04:27:15 PM

News:

IWBasic runs in Windows 11!


Problem with compile

Started by billhsln, February 24, 2013, 10:49:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

Getting error:

Compiling...
RegEx.iwb
No Errors

Linking...
IWBasic Linker v1.11 Copyright © 2011 Ionic Wind Software
Unresolved external __imp__gmtime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__gmtime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__mktime64
Error: C:\Program Files\iwbdev\libs\disphelper.lib\disphelper.obj - Unresolved extern __imp__localtime64
Error(s) in linking C:\Documents and Settings\All Users\Documents\IWBasic\MyProgs\RegEx\RegEx.exe

I have looked thru all the files in my LIB directory and can find nothing that defines these Unresolved fields.  I am trying to see about doing a REGEX subroutine, but I can't get it to compile without these definitions.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

Have you installed Sapero's header files and have
$use "windowssdk.inc"
at the top of your program?
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

Added it and still get same errors:

Here is the code:

$include "shlwapi.inc"
$use "windowssdk.inc"

OPENCONSOLE

PRINT "VBS Regular Expression Example"
PRINT "------------------------------"
PRINT strRep("1m2i3n4i5B6a7s8i9c0", "[a-z]", ",")
PRINT strRep("1m2i3n4i5B6a7s8i9c0", "[0-9]","")
IF strMatch("[mini]","1m2i3n4i5B6a7s8i9c0")
PRINT "Pattern Match"
ELSE
PRINT "No Pattern"
ENDIF

PRINT
PRINT "Press Any Key to Exit"
DO
UNTIL INKEY$ <> ""
CLOSECONSOLE
END

'replace in a string
SUB strRep(string strmain,string pattern,string replace),string
string temp
IUnknown regexp = CreateComObject("VBScript.RegExp","")
SetComProperty(regexp,".IgnoreCase = %d",TRUE)
SetComProperty(regexp,".Global = %d",TRUE)
SetComProperty(regexp,".Pattern = %s",pattern)
GetComProperty(regexp,"%s",&temp,".Replace(%s,%s)",strmain,replace)
SysFreeString(temp)
regexp->Release()
RETURN temp
ENDSUB

'finding matches
SUB strMatch(string pattern,string strmain),int
int value
IUnknown regexp = CreateComObject("VBScript.RegExp","")
SetComProperty(regexp,".Pattern = %s",pattern)
SetComProperty(regexp,".IgnoreCase = %d",TRUE)
GetComProperty(regexp,"%b",&value,".Test(%s)",strmain)
regexp->Release()
RETURN value
ENDSUB


Not a lot to it, it just is missing some thing.

Thanks,
Bill
(Trying to keep forum active, so any one checking it out will see that we have things going on, other than waiting for update to new version)  I keep trying things.  Just not good enough to get some to work.
When all else fails, get a bigger hammer.

LarryMc

$use "windowssdk.inc"
was typeo, should have been
$include "windowssdk.inc"
but I get the same errors you do.
I'll see what I can find.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

you need to use
$use "msvcrt.lib"
to get it to compile
when it runs it crashes.
afraid I'm not going to be much help with COM objects
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library