User forums > Using Code::Blocks

Can CB use a linux shell script to build a project?

<< < (2/6) > >>

Marnix:
Well, i've studied the manual about build targets, but I have had no success in converting the shell script to CB build targets. I hope someone can help me out.

The first build target must create the ifigame.so library. I figured out the build target must be of type dynamic library.  But I have no clue what to enter for import library filename and Definition file filename. And the build target file selection pane is greyed out so I cannot select files. I'm sure it must be pretty basic but I just don know how to proceed.

There are 2 build targets, debug and release (console applications) that were created when I started the project. I tried to analyze these to get an idea how build targets work, but they seem identical but for the file name. So, now I'm even more confused.

oBFusCATed:

--- Quote from: Marnix on June 17, 2018, 01:42:02 pm ---The first build target must create the ifigame.so library. I figured out the build target must be of type dynamic library.  But I have no clue what to enter for import library filename and Definition file filename. And the build target file selection pane is greyed out so I cannot select files. I'm sure it must be pretty basic but I just don know how to proceed.

--- End quote ---
Ignore these. They are for windows.


--- Quote from: Marnix on June 17, 2018, 01:42:02 pm ---There are 2 build targets, debug and release (console applications) that were created when I started the project. I tried to analyze these to get an idea how build targets work, but they seem identical but for the file name. So, now I'm even more confused.

--- End quote ---
If you compare the build options related to the compiler of the two you'll see that the release target has full optimizations enabled and the debug target has the debugging options enabled.

Marnix:
Well, I did as you told and I got it to work! I now got 1 virtual target that consists of a library and an application. It was a bit of a puzzle, though. E.g. the '-pthread' should go to the 'other linker options' in the linker settings tab and not to the 'other options' in the compiler settings.

Thanks a lot for your help in getting this up and running!

So, from the command line, the application starts with: ./ificonsole -d 3 -configdir escape -story escape.dat

Does that mean i must copy "-d 3 -configdir escape -story escape.dat" to the program argument's window and select the target that is the application as the main executable? I cannot find a thing about it in the manual.

And what do "host application" and "run host in terminal mean" in the program arguments window?

oBFusCATed:

--- Quote from: Marnix on June 18, 2018, 10:17:27 pm ---It was a bit of a puzzle, though. E.g. the '-pthread' should go to the 'other linker options' in the linker settings tab and not to the 'other options' in the compiler settings.

--- End quote ---
If you read the manual of gcc you'll find that it must go in both places.



--- Quote from: Marnix on June 18, 2018, 10:17:27 pm ---Does that mean i must copy "-d 3 -configdir escape -story escape.dat" to the program argument's window and select the target that is the application as the main executable?

--- End quote ---
Yes, this is how it is supposed to be done.


--- Quote from: Marnix on June 18, 2018, 10:17:27 pm ---And what do "host application" and "run host in terminal mean" in the program arguments window?

--- End quote ---
This is used when you have only a library project and the application is some external application. There you place the path to the application's executable.

Marnix:
I noticed that when I

3. make sure library is above application

and then build the virtual project, CB

- cleans the application
- cleans the library
- starts building the application
- and throws an error about not being able to find the library (which makes sense, because it just cleaned it)

When I put the application above the library, the library is built first and all goes ok. It looks like it builds from bottom to top?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version