Bei mir ist es nur eine und wenn es richtig umgestellt ist, kommt keine.
Die mitgelieferte Library.exe ist daher wohl mit was anderem compiliert worden, da
sie trotz fehlerhaften Source zur Exe compiliert wurde.
OriginalSource aus dem Example-Verzeichnis der neuen Beta
Code: Alles auswählen
;
; ------------------------------------------------------------
;
; PureBasic - Library
;
; (c) 2003 - Fantaisie Software
;
; ------------------------------------------------------------
;
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
If OpenLibrary(0, "USER32.DLL")
*MessageBox = GetFunction(0, "MessageBoxA")
CallFunctionFast(*MessageBox, 0, "Body", "Title", 0)
EndIf
CloseLibrary(0)
EndIf
CompilerCase #PB_OS_Linux
If OpenLibrary(0, "libc.so")
*MAlloc = GetFunction(0, "malloc")
If *MAlloc
*Buffer = CallCFunctionFast(*MAlloc, 128)
If *Buffer
Debug "Buffer allocated"
CallCFunction(0, "free", *Buffer)
EndIf
EndIf
CloseLibrary(0)
EndIf
CompilerEndSelect
Korrigiert sieht das dann so aus, lässt sich compilieren und unter dem virtuellen Win2000 mit Avira kommt
keine Virenwarnung.
Code: Alles auswählen
;
; ------------------------------------------------------------
;
; PureBasic - Library
;
; (c) 2003 - Fantaisie Software
;
; ------------------------------------------------------------
;
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
If OpenLibrary(0, "USER32.DLL")
*MessageBox = GetFunction(0, "MessageBoxA")
Text.s="Body"
Text1.s="Title"
If *MessageBox
CallFunctionFast(*MessageBox, 0, @Text, @Text1, 0)
EndIf
CloseLibrary(0)
EndIf
CompilerCase #PB_OS_Linux
If OpenLibrary(0, "libc.so")
*MAlloc = GetFunction(0, "malloc")
If *MAlloc
*Buffer = CallCFunctionFast(*MAlloc, 128)
If *Buffer
Debug "Buffer allocated"
CallCFunction(0, "free", *Buffer)
EndIf
EndIf
CloseLibrary(0)
EndIf
CompilerEndSelect
Ich übrgens habe mit Norton auch keine Warnung erhalten. Aber trotzdem wird man skeptisch, mit was
für Sources diese Exe erstellt worden ist, und Virenalarm schlägt.
Die Frage, woher die Exe kommt hatte sich weiter oben erübrigt. Schließlich ist dort auch die fertig compilierte
Library.exe enthalten, die beim Ausführen Avira anschlagen lässt.
Gruß Falko