cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,373 Views
Registered: ‎11-08-2016

Xilinx SDK adding folder with source

Hello

 

What is correct way to do when new folder with source is created and added to application project so I won't see compilation errors such "No such file or directory" "Undefined reference..."etc?

 

I'm used to from other Eclipse forks (for qt C MinGW, STM32...) that the internal Makefile is updated with modified source tree or I have to do some stuff in Project>Properties>C/C++ Buld>Directories/Libraries/Paths and Symbols

 

Let's say in SDK I create simple project what have default tree with "src" folder, ldscript.ld and some internal Makefile what I don't see so I don't know what is changed when build settings are modified. Then I create folder "xxx" in "src" folder and create/copy/import some source stuff into it. Then project cannot be compiled without errors. :(

 

I'm playing with build settings like adding include/source paths to this "xxx" folder but project is even more broken as I get errors with missing stuff from BSP layer.

 

 

Regards,

longin

0 Kudos
4 Replies
Highlighted
Scholar
Scholar
3,339 Views
Registered: ‎04-13-2015

hi @longin

The easiest and safest way to add a new folder:

- right click on the project --> New --> folder

you can then move the folder inside another folder etc

To add new files , same procedure but select source file / header instead fo folder.

Then replace the new files with yours.

You need to do these because what is visible in the folders is not what Elipse is aware of.

 

 

0 Kudos
Highlighted
Visitor
Visitor
3,315 Views
Registered: ‎11-08-2016

hi

 

I tried your way and no success. :(

XILINX_SDK.png

 

ofc I can make it work with "#include "some_folder/foo.h". My question is about making these h/c files known across the project so I don't have to specify absolute or relative paths in #include directive.

 

0 Kudos
Highlighted
Scholar
Scholar
3,308 Views
Registered: ‎04-13-2015

Hi @longin

 

You need to inform the compiler where to find these includes,.

To set the path of these includes:

Right click on the project

Select Properties

expand "C/C++ Build"

under "setting"

"Tool setting" tab

compiler

directory

add the paths in there

 

Highlighted
Visitor
Visitor
3,299 Views
Registered: ‎11-08-2016

Thanks,

 

this was the thing what I was looking for.

 

 

0 Kudos