GoTo Declaration doesn't work

CodeLite installation/troubleshooting forum
borisfa
CodeLite Enthusiast
Posts: 17
Joined: Sun Jul 15, 2018 10:30 pm
Genuine User: Yes
IDE Question: C++
Contact:

GoTo Declaration doesn't work

Post by borisfa »

Hi ,
Right click goto declaration has no effect same problem with goto implementaion , I am using version 14.0 for windows and for Linux ,
in the past Iyt was 11 but all of them hava't this functionality , I searcked on the web but no suceess, what is missing here ?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by eranif »

1. Did you install Language Server? See this page: https://wiki.codelite.org/pmwiki.php/Ma ... uageServer
2. Do you have an open workspace?
3. Can you provide an minimal workspace that demonstrate this problem?

Eran
Make sure you have read the HOW TO POST thread
borisfa
CodeLite Enthusiast
Posts: 17
Joined: Sun Jul 15, 2018 10:30 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by borisfa »

1. Yes it's installed , in windows I have problem to compile it ( I can compile from terminal ) I get
C:\WINDOWS\system32\cmd.exe /C mingw32-make.exe -j 8 -e -f Makefile
----------Building project:[ CPPTutorial - Release ]----------
mingw32-make[1]: Entering directory 'C:/CPrograms/CPPTutorial'
clang++ -c "C:/CPrograms/CPPTutorial/main.cpp" -O2 -std=c++17 -Wall -DNDEBUG -o ../Env/build-Release/__/CPPTutorial/main.cpp.o -I. -I.
clang++ -c "C:/CPrograms/CPPTutorial/Person.cpp" -O2 -std=c++17 -Wall -DNDEBUG -o ../Env/build-Release/__/CPPTutorial/Person.cpp.o -I. -I.
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make[1]: *** [MakeIntermediateDirs] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
CPPTutorial.mk:84: recipe for target 'MakeIntermediateDirs' failed
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
mingw32-make[1]: *** [../Env/build-Release/__/CPPTutorial/.d] Error 1
CPPTutorial.mk:88: recipe for target '../Env/build-Release/__/CPPTutorial/.d' failed
error: unable to open output file '../Env/build-Release/__/CPPTutorial/main.cpp.o': 'no such file or directory'
1 error generated.
mingw32-make[1]: *** [../Env/build-Release/__/CPPTutorial/main.cpp.o] Error 1
CPPTutorial.mk:97: recipe for target '../Env/build-Release/__/CPPTutorial/main.cpp.o' failed
error: unable to open output file '../Env/build-Release/__/CPPTutorial/Person.cpp.o': 'no such file or directory'
1 error generated.
mingw32-make[1]: *** [../Env/build-Release/__/CPPTutorial/Person.cpp.o] Error 1
CPPTutorial.mk:102: recipe for target '../Env/build-Release/__/CPPTutorial/Person.cpp.o' failed
mingw32-make[1]: Leaving directory 'C:/CPrograms/CPPTutorial'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target 'All' failed
====0 errors, 0 warnings====


First of all what is a problem here ? From terminal it's workes well .Why IDE has used mingw make file for clang compiler .
In the second goto Defenition works from my classes when I press to class Person it comes to custom class definition howver when I press on new or
std::cout or something from system this is no effect ,

In Linux there is a same affect expect compilation works no troubles .

I have open workspace ,
What do you mean say "Can you provide an minimal workspace that demonstrate this problem" ? I demonstared it befre Is it good enough ?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by eranif »

You are mixing MSYS with MinGW
For some reason, your compiler "thinks" that /usr/bin/sh is your terminal (it shouldn't do that)
This means that:
1. You configured your compiler to be the one that comes with msys
2. You started CodeLite within MSYS terminal

This line:

Code: Select all

 C:\WINDOWS\system32\cmd.exe /C mingw32-make.exe -j 8 -e -f Makefile
Tells me that your compiler is not configured properly. CodeLite never uses relative paths, only full path. If the compiler was configured properly this line should have looked something like this:

Code: Select all

C:\Windows\system32\cmd.exe /C C:/compilers/mingw64/bin/mingw32-make.exe -j16 SHELL=cmd.exe -e -f  Makefile
Notice the differences:
1. SHELL=cmd.exe -> this one is explicitly tells minwg32-make.exe that the terminal to be used is cmd.exe and _not_ /usr/bin/sh
2. mingw32-make.exe is used *full path*

Please provide more information on:
1. Which compiler is installed and where
2. Show us the compiler settings (settings->build settings)
3.Project settings (the General tab)
Make sure you have read the HOW TO POST thread
borisfa
CodeLite Enthusiast
Posts: 17
Joined: Sun Jul 15, 2018 10:30 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by borisfa »

1. I have two compilers on my windows mingw and clang , each one in separate folder first in C:\MinGW and second in C:\Program Files\LLVM I see that mixing but I install codelite by default , and it works well from terminal window .

2. You started CodeLite within MSYS terminal - I started it from windows like every one program Why do I need mixed mingw and clang ? This is a default IDE definition? It looks like that any where mingw make file does job why is it neccessary for clang ? I see setting->build setting under make is
setup mingw32-make.exe -j 8( It looks strange , but when I dropped it nothing occurs .
How could I show screen here ? I see nothing like attach file/picture.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by eranif »

When you type a reply, at the bottom there are 2 tabs: "Options" & "Attachment"
Click on the "attachments" tab and add your files
Make sure you have read the HOW TO POST thread
borisfa
CodeLite Enthusiast
Posts: 17
Joined: Sun Jul 15, 2018 10:30 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by borisfa »

This is a setting , Is it clear that mingw32-make.exe -j 8 run clang compiler ??
This is default setting of IDE , How fix it ?
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by eranif »

OK. These are the default settings
Click the on the magnifier button and let CodeLite search for compilers for you
Make sure you have read the HOW TO POST thread
borisfa
CodeLite Enthusiast
Posts: 17
Joined: Sun Jul 15, 2018 10:30 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by borisfa »

Well I clicked I it need to choose file myself , I can set full path to clang or clang++ linker , share object linker but which file to set up instead of make ?
mingw32-make.exe -j 8 will run mingw and that what I really don't need whhich file is correct in LLVM\bin folder ?

Look clang2 and clang3 attached files in last I choose full path for each *.exe, despite that is not write way , I mean in the same way choose make file but this one is not exist in bin folder .

What has it to to exactly?
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GoTo Declaration doesn't work

Post by eranif »

In my previous post, I asked you to click on the magnifier button - did you click it?
If this does not work, you should click on the '+' button (green plus button) and select the folder that contains clang.exe
In anyways, you should not add the entries by hand
Make sure you have read the HOW TO POST thread
Post Reply