Reference to library code

Hi all.

I am using the new Sunstudio. It works great!

I would like put the cursor on an identifier, press the control key, and go to the declaration of that identifier. I can do that, within my own application. But I would also like to follow the reference out to library code.

In an attempt, I created a project for one of the libraries involved. I could follow a link within the library, but not to the library from my application. Following the help page "Creating Dependencies Between Projects," I tried to link the two projects together, but my Project Properties dialog has no linker node.

This is probably because my projects use established makefiles, and doesn't let the studio create the makefiles.

Is there some way to tell the IDE to check another project to resolve names?

Thanks,

Rick

[855 byte] By [RickHa] at [2007-11-27 8:45:56]
# 1

Rick,

If your project is created as "Project from existent code", then you can do the following: go to project properties -> "Code Assistance" -> "C++ Compiler" (or "C Compiler") -> "General" and set correct Include Directories.

You can also set this property for individual files or folders if this is more appropriate.

There is also an automatic way of configuring all this stuff via "Configure Code Assistance" menu item (in Project Explorer context menu). To use it, you should build your project with debug information (for Sun Studio compilers just -g option is sufficient, for GNU compilers you'll need -g3 -gdwarf-2).

Vladimir_Kvashina at 2007-7-12 20:47:32 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Hello Vladimir.

Well, sadly, putting the other library in the include directory list doesn't work for me. I just get a beep. It works for you, eh? You're able to put the directory in the list, it works, and then remove it, and it doesn't?

The other technique I get even less far with. Perhaps I will eventually encounter a step-by-step procedure in a test situation, and I will be able to watch it work, and understand how it works.

Thanks,

RickH

RickHa at 2007-7-12 20:47:32 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

Hey Vladimir!

Not working for me appears to have been a result of the include directory not being treated recursively. When I have an entry for each include directory all the way down, it works! The clue was that I noticed that it was offering me "View Failed #include Directives."

Now how do I give you these penguin points?

Thanks sincerely,

RickH

RickHa at 2007-7-12 20:47:32 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

Hi Rick,

Yes, it doesn't go recursively into include directories - it works exactly like -I compiler option does.

Have you ever tried "Configure Code Assistance" for makefile-based project? Most users who tried it were satisfied. In easy situation it's ok to add include dirs manually, but in complex projects it can be a nightmare...

Sorry, what penguin points are you talking about?

Regards,

Vladimir

Vladimir_Kvashina at 2007-7-12 20:47:32 > top of Java-index,Development Tools,Solaris and Linux Development Tools...