Error Building a PureLibrary on x86 system

Just starting out? Need help? Post your questions and find answers here.
Little_man
Enthusiast
Enthusiast
Posts: 152
Joined: Fri Mar 29, 2013 4:55 pm
Location: The Netherland

Error Building a PureLibrary on x86 system

Post by Little_man »

Hello,

If I use the code below and the library creation tool of the IDE of 'PF Shadoko', this goes well with;

I use Purebasic 6.20.

-PureBasic X64, Lib_Forcedirectories ("C: \ dump \ 1 \ 2 \ 3 \ 4 \ 5 \") -> does not give Error.
and with the same tool but with Purebasic X86
-Purebasic X86, Lib_Forcedirectories ("C: \ dump \ 1 \ 2 \ 3 \ 4 \ 5 \") -> Gives Error.

Code: Select all

DisablePureLibrary ForceDirectories

ProcedureDLL Lib_ForceDirectories(Dir.s)
  Static TmpDir.s, Init
  Protected Result

  If Len(Dir) = 0
      ProcedureReturn #False
    Else
      If Not Init
        TmpDir = Dir
        Init   = #True
      EndIf
      If (Right(Dir, 1) = "\")
        Dir = Left(Dir, Len(Dir) - 1)
      EndIf
      If (Len(Dir) < 3) Or FileSize(Dir) = -2 Or GetPathPart(Dir) = Dir
        If FileSize(TmpDir) = -2
          Result = #True
        EndIf
        TmpDir = "": Init = #False

        ProcedureReturn Result
      EndIf

      Lib_ForceDirectories(GetPathPart(Dir))
      ProcedureReturn CreateDirectory(Dir)
  EndIf
EndProcedure
Does anyone have a solution to this problem?.

Little_man
breeze4me
Enthusiast
Enthusiast
Posts: 633
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: Error Building a PureLibrary on x86 system

Post by breeze4me »

In 6.20 x86 I get an error like you said, but in 6.21 b8 x86 it runs fine. The bug seems to have been fixed.
Post Reply