User forums > Embedded development

How to set linker options for compiler file using source code

(1/2) > >>

pramaykaruley:
I have created new compiler.xml file and corresponding option.xml file with include and lib path in it.

I want to link external libraries to the compiler using source code, where should I put that?

For Ex: If I want to create a compiler to compile to opengl program, then I have to link -lglfw3 -lgdi32 -lopengl32 libraries

This I want to achieve with the help of source code.

Please help..

Thanks in advance!!

stahta01:
Are you blind?

If no, please state a valid reason you do not wish to use the Code::Blocks GUI interface to set the libraries you wish to link?

Tim S.

sodev:
Well, it looks like he is abusing the compiler definition system to define default compiler settings to deploy them to multiple projects or installations.

This is the poor mans method if you don't use a meta-project generator like PreMake or CMake where you can achieve that by using setup-scripts you store in a central location and import them into the projects. Or if you use an IDE that doesn't have an integrated feature for that like e.g. Visual Studio with its Property Pages ;).

stahta01:

--- Quote from: sodev on June 14, 2018, 01:34:07 am ---Well, it looks like he is abusing the compiler definition system to define default compiler settings to deploy them to multiple projects or installations.

This is the poor mans method if you don't use a meta-project generator like PreMake or CMake where you can achieve that by using setup-scripts you store in a central location and import them into the projects. Or if you use an IDE that doesn't have an integrated feature for that like e.g. Visual Studio with its Property Pages ;).

--- End quote ---

Could CB project scripts be used to set link libraries values?

Tim S.

pramaykaruley:

--- Quote from: stahta01 on June 13, 2018, 11:49:09 pm ---Are you blind?

If no, please state a valid reason you do not wish to use the Code::Blocks GUI interface to set the libraries you wish to link?

Tim S.

--- End quote ---

The configuration made by codeblocks GUI are saved locally. I want it to persist whenever I install codeblocks from a locally created .deb file

Navigation

[0] Message Index

[#] Next page

Go to full version