XusinboyBekchanov / MyFbFramework

My FreeBasic Framework
Other
64 stars 18 forks source link

Compile 64 bit error but 32-bit pass if include once "bass.bi" #27

Closed chunmingwang closed 2 years ago

chunmingwang commented 2 years ago

Compile 64 bit error but 32-bit pass if include once "bass.bi" Source code for ref.

#ifdef __FB_WIN32__
    '#Compile "Form1.rc"
#endif
'#Region "Form"
    #include once "mff/Form.bi"
    #include once "bass.bi"

    Using My.Sys.Forms

    Type Form1Type Extends Form

    End Type

    Dim Shared Form1 As Form1Type

    #ifndef _NOT_AUTORUN_FORMS_
        #define _NOT_AUTORUN_FORMS_

        Form1.Show

        App.Run
    #endif
'#End Region
XusinboyBekchanov commented 2 years ago

What error?

chunmingwang commented 2 years ago

ld.exe: cannot find -lbass

12:56:26: Compilation: "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\fbc64.exe"  -b "Form1.frm" -exx -v  "Form1.rc" -s gui -i "F:\OfficePC_Update\!FB\!VisualFBEditor\VisualFBEditor/./MyFbFramework"

FreeBASIC Compiler - Version 1.09.0 (2021-12-31), built for win64 (64bit)

Copyright (C) 2004-2021 The FreeBASIC development team.

standalone

target:       win64, x86-64, 64bit

backend:      gcc

compiling:    Form1.frm -o Form1.c (main module)

compiling C:  F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -Wno-format -masm=intel "Form1.c" -o "Form1.asm"

assembling:   F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\as.exe --64 --strip-local-absolute "Form1.asm" -o "Form1.o"

compiling rc:               F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "Form1.obj" "Form1.rc"

linking:      F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\ld.exe -m i386pep -o "Form1.exe" -subsystem windows -T "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64\fbextra.x" --stack 2097152,2097152 -s -L "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64" -L "." "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64\crt2.o" "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64\crtbegin.o" "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64\fbrt0.o" "Form1.o" "Form1.obj" "-(" -lkernel32 -lgdi32 -lmsimg32 -luser32 -lversion -ladvapi32 -limm32 -lcomctl32 -lcomdlg32 -luuid -lole32 -loleaut32 -liphlpapi -lrasapi32 -lws2_32 -lshlwapi -lshell32 -lgdiplus -lddraw -ldxguid -luxtheme -lbass -lfbmt -lgcc -lmsvcrt -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\lib\win64\crtend.o" 

F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\ld.exe: cannot find -lbass

linking failed: 'F:\OfficePC_Update\!FB\FreeBASIC-1.09.0-winlibs-gcc-9.3.0\bin\win64\ld.exe' terminated with exit code 1

12:56:36: Do not build file. Elapsed Time: 9.03 Seconds
XusinboyBekchanov commented 2 years ago

You need 64-bit lbass library

chunmingwang commented 2 years ago

got it