Build time for BuildActionPreprocessESQLHandler: 154ms
Building C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o
BuildingC:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.cbsql
Using compiler C:/msys64/mingw64/bin/cobc.exe
C:/msys64/mingw64/bin/cobc.exe -std default -g -debug -O0 --fgen-c-line-directives --fgen-c-labels -A -O0 -gdwarf-4 -I C:/Users/stealth_droid/Documents/Gix/Examples/test001 -I C:/Users/stealth_droid/AppData/Local/Programs/Gix-IDE/lib/copy -I C:/Users/stealth_droid/AppData/Local/Programs/Gix-IDE/lib/copy -lmingw32 -lfmt -lgixsql -lgnucobol -lm -lgcc -lstdc++ -lspdlog -t --tsymbols -v -x -c -o C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.cbsql
cobc: error: -o option invalid in this combination
cobc (GnuCOBOL) 3.2.0
Built Nov 27 2024 17:43:47 Packaged Jul 28 2023 17:02:56 UTC
C version (MinGW) "14.2.0"
Build error
Exit code: 1
An error occurred while handling target C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o
An error occurred while handling target C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.exe
Build error
Hi -
I think it is telling me don't use both -x and -c together in one step is that correct?
Is there a way i can fix in the gui for gix ide?
I just understand things like compile to produce o and then link etc.
I don't know this very well admittedly.
If you include linking flags (like -lgixsql, -lgnucobol) while using -c, it may confuse the build system and cause errors like "extra -o error," because the compiler will expect to link them at the end, but you’ve told it not to do so with -c.
-lgixsql and -lgnucobol: These are linking flags, but you’re not actually linking anything since you used -c.
This would likely trigger errors because the linking flags (-lgixsql, etc.) don’t make sense when you’re only compiling (not linking). The linker will not be involved at all during the -c step.
Correcting the Command:
You should separate the compilation and linking steps. For example:
Build time for BuildActionPreprocessESQLHandler: 154ms
Building C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o
BuildingC:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.cbsql
Using compiler C:/msys64/mingw64/bin/cobc.exe
C:/msys64/mingw64/bin/cobc.exe -std default -g -debug -O0 --fgen-c-line-directives --fgen-c-labels -A -O0 -gdwarf-4 -I C:/Users/stealth_droid/Documents/Gix/Examples/test001 -I C:/Users/stealth_droid/AppData/Local/Programs/Gix-IDE/lib/copy -I C:/Users/stealth_droid/AppData/Local/Programs/Gix-IDE/lib/copy -lmingw32 -lfmt -lgixsql -lgnucobol -lm -lgcc -lstdc++ -lspdlog -t --tsymbols -v -x -c -o C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.cbsql
cobc: error: -o option invalid in this combination
cobc (GnuCOBOL) 3.2.0
Built Nov 27 2024 17:43:47 Packaged Jul 28 2023 17:02:56 UTC
C version (MinGW) "14.2.0"
Build error
Exit code: 1
An error occurred while handling target C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.o
An error occurred while handling target C:/Users/stealth_droid/Documents/Gix/Examples/test001/bin/debug/x64/TEST001.exe
Build error
Hi -
I think it is telling me don't use both -x and -c together in one step is that correct?
Is there a way i can fix in the gui for gix ide?
I just understand things like compile to produce o and then link etc.
I don't know this very well admittedly.
-g -O0 -c -std=c99
-lmingw32 -lfmt -lgixsql -lgnucobol -lm -lgcc -lstdc++ -lspdlog
Sent with Proton Mail secure email.
thanks
------- Forwarded Message -------
From: J McNamara masticon@users.sourceforge.net
Date: On Friday, December 6th, 2024 at 4:47 PM
Subject: [gnucobol:discussion] gix gix-sql build help
To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net
i got this off chatgpt .
I guess i was way off.
I will work on what it tells me.
thanks
Possible Error Scenario:
If you include linking flags (like -lgixsql, -lgnucobol) while using -c, it may confuse the build system and cause errors like "extra -o error," because the compiler will expect to link them at the end, but you’ve told it not to do so with -c.
Example of what might be wrong:
bash
Copy code
gcc -g -O0 -c -std=c99 mysource.c -o mysource.o -lgixsql -lgnucobol
This would likely trigger errors because the linking flags (-lgixsql, etc.) don’t make sense when you’re only compiling (not linking). The linker will not be involved at all during the -c step.
Correcting the Command:
You should separate the compilation and linking steps. For example:
bash
Copy code
gcc -g -O0 -c -std=c99 mysource.c -o mysource.o
bash
Copy code
gcc -o myprogram mysource.o -lgixsql -lgnucobol -lm -lgcc -lstdc++ -lspdlog
This way, you’re:
Conclusion:
In summary:
bash
Copy code
gcc -g -O0 -c -std=c99 mysource.c -o mysource.o
bash
Copy code
gcc -o myprogram mysource.o -lgixsql -lgnucobol -lm -lgcc -lstdc++ -lspdlog
Let me know if this clears things up or if you encounter further issues!
Sent with Proton Mail secure email.
------- Forwarded Message -------
From: Jim McNamara jmcnamara10001@proton.me
Date: On Friday, December 6th, 2024 at 5:02 PM
Subject: Fw: [gnucobol:discussion] gix gix-sql build help
To: [gnucobol:discussion] help@discussion.gnucobol.p.re.sourceforge.net