[Insight-users] [insight-users] Eclipse setup : debug, viewing sources and correct project tree
Antonin Perrot-Audet
antonin07130 at gmail.com
Wed Mar 10 09:52:58 EST 2010
On 3/10/10 3:15 PM, Michael Jackson wrote:
> Since ITK builds its libraries without any "install_name" you need
> to set the "DYLD_LIBRARY_PATH" to the absolute path to the ITK
> Libraries. Attached is a screen shot showing where this setting is at.
> Within Eclipse go to the "Debug" icon, click to drop it down, select
> "Debug Configurations", a new window pops up, select your executable,
> the select the "Environment" tab.
>
> Also, you need to go to the "Window" menu, then "Show View" then
> "C/C++ Projects". From your screen shot, you are using the Generic
> "Projects View". Using the "C/C++ Projects" view will give you some
> additional features.
>
> ___________________________________________________________
> Mike Jackson www.bluequartz.net
> Principal Software Engineer mike.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
>
>
> On Mar 10, 2010, at 4:59 AM, Antonin Perrot-Audet wrote:
>
>> Thanks Mr Jackson, for your help, I am definitely moving forward : I
>> now have a project which seems to be set up approximatively right in
>> Eclipse :
>> 1) I can now see my sources, in the project explorer and edit them
>> etc... btw, code completion works great
>> 2) I can compile and make a nice executable, which works well
>> 3) I also added the false target, to run cmake from eclipse.
>> BUT :
>> 1) I still have problems debugging : when I try to debug, (the bug icon)
>>
>> I get many warnings of this type :
>> "
>> warning: Unable to read symbols for "libitksys.3.16.dylib" (file not
>> found).
>> warning: Unable to read symbols from "libitksys.3.16.dylib" (not yet
>> mapped into memory).
>> "
>> and then an error :
>> "
>> Target selection failed.
>> /dev/ttyS0: No such file or directory
>> /dev/ttyS0: No such file or directory
>> /dev/ttyS0: No such file or directory
>> "
>>
>> 2) I don't see my "main" in the Maketargets view, there is actually
>> nothing in this view but my project's tree (and the target I manually
>> added to execute Cmake)
>>
>>
>> I posted a screen capture on this server, it might be of any help
>> understanding my problem :
>> http://fex.insa-lyon.fr/get?k=JG3zsR8MEZkeiOKHS27
>>
>> Regards,
>>
>> Antonin Perrot-Audet
>> _____________________________________
>
Thank you, I figured that out this morning (france), and I was quite
reluctant to edit my system's variables :
1)how portable would be such a solution?
2)would I face this type of problem if I compile and install ITK without
shared libs (ITK_SHARED_LIBS = OFF)?
3)howto compile my executable without shared libraries (if I want to put
it all in the executable) if I installed itk on my system *with* shared
libraries.
however, the solution is indeed to edit the .profile and export ITK's
shared libs folder to DYLD_LIBRARY_PATH .
Thanks to your help, I could get it up and running, thank you very much
for your attention !
Regards,
Antonin
PS : some details which are not in the tutorial :
1)you need to put your project within Eclipse's workspace, otherwise,
even if you specify absolute paths, eclipse will struggle finding
sources and binaries.
2)if you use shared libraries, you need to add that to eclipse's
environment variables
this may be obvious for most users.
I was looking for this issue and found out that one also needs to
manually edit the DYLD_LIBRARY_PATH for VTK.
--
Antonin Perrot-Audet
Electrical Engineering& Computer Sciences, INSA Lyon
M2 GEGP Signal& Image Processing, INSA Lyon, UCBL, Centrale Lyon
More information about the Insight-users
mailing list