Open tepsl opened 8 years ago
Hi, can you please confirm you have a Go SDK attached to the IDE? Have a look under File | Settings | Languages & Frameworks | Go | Go SDK
.
If it's there, can you please also post a screenshot of the Project
view (CTRL+1 usually)?
I've just tried this under CLion 2016.2 and I cannot replicate it.
Thanks.
@dlsniper Yes, Go SDK has been set.
I'm not sure this is not what you meant but this is the screenshot of my project view;
The project above is what I made for this issue and my project of practical use, which went very well on CLion 2016.1.3, shows vastly lots of unresolved references on CLion 2016.2.
This is the screen shot of the same project opened by CLion 2016.1.3;
Plugin version: 0.11.1682
That's strange, I don't see any external libs attached, see how I have it there: But I also don't have any of the C files there. I'll let Sergey / Alexander to tackle this going forward.
@dlsniper FYI, I have never seen any External Libraries attached at Go project by CLion, even if it works well.
@tepsl cannot recreate, could you try to unset Go SDK and then set again (File | Settings | Languages & Frameworks | Go | Go SDK)
@zolotov
Finally I've got it working.
First time I did was to unset Go SDK in Preferences and press Apply and close Preferences. Then I opened Preferences and set Go SDK and saw the version was 1.6.2 although I had upgraded golang to 1.6.3. Cached, maybe? Opening the go project was still showing references unsolved. So I let it unset and quitted CLion and started again. This time setting Go SDK showed 1.6.3. Now the go project shows all references solved.
The point is just to unset Go SDK didn't make any sense. To unset, apply, quit, and set seems to be required.
Anyway, thank you for the instruction.
P.S. External Libraries is still empty as before.
@tepsl thank you for update. I'm happy it works.
I'll investigate this situation later
@zolotov I was having the same problem has @tepsl and your suggestion fixed the problem, thanks.
Normally I'd avoid posting because this sounds like a 'me too' comment but I thought I should because I had the same problem outside of CLion:
Happy to provide additional context if needed.
For the sake of future Googlers -- this issue can also occur if you "exclude" a directory from your project that contains sources that you need. Doesn't render a total failure but sporadically was producing these issues for me.
I haven't been able to repro with a minimal example, but marking my internal GOPATH dir as not excluded fixed similar issues for me.
Your issue description goes here. Please be as detailed as possible
Nothing is wrong before upgrading from CLion 2016.1 to CLion 2016.2.
simple_example.go
CMakeDetermineGoCompiler.cmake
CMakeGoCompiler.cmake
CMakeGoInformation.cmake
CMakeLists.txt
CMakeTestGoCompiler.cmake
Be sure to set appropriate environment variables (GOPATH, GOOS, GOROOT, GOARCH) at Preferences -> Build, Execution, Deployment -> CMake -> Pass system environment. If it doesn't work, please edit .idea/workspace.xml as below;