News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

compiler args and flags

Started by maxcy, September 26, 2023, 03:39:26 AM

Previous topic - Next topic

maxcy

 :)  I have a C++ compiler xref project that I got to compile. It uses a filename arg and also needs to use the -x xref flag compiler option. The filename program argument is easy. The compiler flags settings doesn't show any -x options. Maybe going into "other compiler options" and adding -x will do?  From what I know the -x option generates xref info from the compiler as it compiles the source  code. How do I access the xref data that is generated by the compiler with the -x flag set?
maxcy/wt1v

stahta01

#1
Code::Blocks assumes an two stage build method is used.

1. Stage one creates object file(s)
2. Stage two uses the object file(s) to create an output file

Linker options are used in stage two
Compiler options are used in stage one

Is the option you wish to add an linker or compiler option?
Try adding the option to the project/target other options for the correct stage.

Edit2: Link I post for adding non C/C++ support it might help if you have no knowledge of advanced compiler settings area https://wiki.codeblocks.org/index.php/Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

maxcy

Rather embarrassing! I put the -x compiler parameter after the first argument and all was well! :o