Problem linking static libraty from console application

CodeLite installation/troubleshooting forum
telespalla.filone
CodeLite Curious
Posts: 3
Joined: Sun Mar 06, 2011 9:38 pm
Genuine User: Yes
IDE Question: c++
Contact:

Problem linking static libraty from console application

Post by telespalla.filone » Sun Mar 06, 2011 10:00 pm

Hi, I'm evaluating CodeLite for a group of projects I have to work on in the coming months and I found some issues, may be due to my lack of experience regarding C++ and CodeLite.
I'm using CodeLite v2.9.0.4684 on Ubuntu 10.10 and have a very basic situation. My workspace contains 2 project, a dynamic library and a console application and I need to use, from the console application, classes provided by the library. I added the include path to the console app settings but I'm not able to set the linker up correctly, so to build everything with no errors. Every time I try I get the output shown on the attached image.
I have been stuck with this for days and I would appreciate a lot any suggestion. Thanks in advance.
I also attach an archive containing a test case workspace to reproduce my problem.

regards

Filippo
You do not have the required permissions to view the files attached to this post.

reiy
CodeLite Curious
Posts: 9
Joined: Sun Mar 06, 2011 4:13 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem linking static libraty from console application

Post by reiy » Mon Mar 07, 2011 6:02 am

Have you set the linker settings? The linker settings can be found at:
"Project Settings" -> Common Settings -> Linker

"Project Settings" can be accessed by right-clicking at your test2 project and click on the "Settings..." option.

josee
CodeLite Enthusiast
Posts: 37
Joined: Fri Feb 05, 2010 10:57 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem linking static libraty from console application

Post by josee » Mon Mar 07, 2011 4:18 pm

Hi,

I don't think that this is a problem with CodeLite but suspect that you mean "TestClassNamespace::" instead of "TestCalssNamespace::".

Regards

Jörg Seebohn

telespalla.filone
CodeLite Curious
Posts: 3
Joined: Sun Mar 06, 2011 9:38 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Problem linking static libraty from console application

Post by telespalla.filone » Mon Mar 07, 2011 5:56 pm

First of all thanks for your time. Well, really the TestCalssNamespace error is a spelling error in the original class (TestClass), I let that the auto completion suggested me the namespace so I think that's not the problem. Moreover I already did as reiy indicates. I tried to set the linker path setting in the console application settings but, unfortunately, with the same result.
Thanks again.

Filippo

telespalla.filone
CodeLite Curious
Posts: 3
Joined: Sun Mar 06, 2011 9:38 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Problem linking static libraty from console application

Post by telespalla.filone » Tue Mar 08, 2011 3:08 am

Well, I finally found the cause of my problem. I did a mistake setting the relative path of the library and I completely forgot to set the library name in linker settings. It is due to my very limited experience in C++ programming and I apologize for that. Sorry for bothering you with a so childish error and thanks again for your time.
Kind regards

Filippo

Post Reply