Can I edit my C++ project in Xcode (with jump to definition/auto completion) without building the project? - c++

I'm working on a C++ project. My company has an internal build system which runs on Linux only. I'm not able to build the project on my mac. I would try to edit my C++ code with Xcode. I'd like to have at least 'jump to definition' and 'auto completion'. I created an empty project in Xcode and imported my files in there. It shows 'Symbol not found' when I tried to jump to definition. Is it possible to let Xcode parse my code without building the project?

Related

How to build&run Unreal C++ project on Linux?

I'm trying to build my first Unreal C++ project on Linux.
I built the engine from source in accordance with "Linux Quick Start" guide. Then I installed Qt Creator and followed the "How to Set up Qt Creator for UE4" guide.
I successfully set up and ran UE4Editor, and created a new C++ project. Unfortunately when I try running the project it complains:
And when I press "yes" this error message is shown:
Here's the error message from the logs:
ERROR: Building would modify the following engine files:
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Android/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/2D/Paper2D/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/AI/AISupport/Binaries/Linux/UE4Editor.modules
... many more
I tried rebuilding UE4 from IDE, then building again - but the error still persists. Same thing happens if I try starting UE4Editor from the engine files and opening the project from there.
What could cause this error? Why does it even try to rebuild the engine when I'm tring run a project?
I have the following script to add the paths to the engine scripts and binaries to my PATH:
UNREAL_HOME="/path/to/source/of/UnrealEngine"
UNREAL_SCRIPTS="${UNREAL_HOME}/Engine/Build/BatchFiles"
UNREAL_SCRIPTS_LINUX="${UNREAL_HOME}/Engine/Build/BatchFiles/Linux"
UNREAL_BINS="${UNREAL_HOME}/Engine/Binaries/Linux"
PATH="${PATH}:${UNREAL_BINS}:${UNREAL_SCRIPTS}:${UNREAL_SCRIPTS_LINUX}"
export PATH
Then I run UE4Editor '/absolute/path/to/project.uproject' from within the directory of my project.
I never create a project inside the source tree of the engine. Paths should absolutely be different.
I use VS-Code as the IDE. This is what works best from my experience. QT-Creator will work only if you create an include files with lots of #define that are missing from the .pro files created by unreal.
You can configure VS-Code to have an intelli-sense like completion by installing the C# and C/C++ extensions. I had to install mono in order to get OmniSharp working (this is the server than handles the autocompletion for VS-Code). Here is an extract of my VS-Code settings.json file:
"omnisharp.path": "/home/myuser/.vscode/extensions/ms-dotnettools.csharp-1.23.9/.omnisharp/1.37.6/omnisharp/OmniSharp.exe",
"omnisharp.monoPath": "/usr/bin/mono",
You can also install the C++ Helper extensions which is usefull for creating methods, classes, and so on.
In the directory of your project run 'make YOURPROJECTNAMEEditor', then you can run 'open YOURPROJECTNAME.uproject' and it should open.

unable to start program QuantLib-vc120-mt-gd.lib

I have installed Visual Studio Community 2013, QuantLib and Boost and have gone through the steps of building the complete quantlib project as per http://quantlib.org/install/vc10.shtml guidelines.
I created a new project under QuantLib_vc11.
I both built Quantlib and the project in Debug Mode. No errors.
Then when I try to debug, I have the following error:
unable to start program QuantLib-vc120-mt-gd.lib_
Do you know where it comes from?
And another question, can we use QuantLib with CodeBlocks?
Thanks.
You're debugging with the QuantLib project as the startup project. Since
QuantLib-vc120-mt-gd.lib is a library, and not an executable file, the debugger rightly complains that it can't start it.
Before launching the debugger, select your new project as the start-up project instead. (I'm assuming that your new project defines a main function and creates an executable, right?) This will cause the debugger to start your program with QuantLib linked.
As for CodeBlocks: there's no included project for it, but QuantLib works with most (if not all) compilers it supports. Creating a new project in CodeBlocks and adding all the sources in the ql folder should enable you to create QuantLib. Note that you'll have to tell CodeBlocks to create a library; I'm not familiar with the IDE, so I'm not able to advise on how to do that.

Linux Eclipse C++ build project from command line

Simple problem, I have a relatively large C++ project that was written in eclipse, I committed that project to svn, and checked out the project on another Linux machine via command line.
I navigated to the project's debug folder and attempted to execute 'make'. The project started building as expected, but began throwing multiple undefined reference errors.
From what I have read, the make file auto generated by eclipse is not intended to be used outside of eclipse.
How can I compile an eclipse project from outside the IDE?

Android Dex: trouble processing "javax/transaction/xa/XAException.class":

I am trying to build my project in the new Android Studio IDE and am unable to. I get this error but I cannot find where this class is being used.
I found this: https://groups.google.com/forum/?fromgroups#!topic/android-platform/abxNKTFkuj8
According to that page it is caused by the IDE trying to build the android.jar library. However I can't find a reference to it n my Project Structure dialog.
Conversion to Dalvik format failed with error 1 in Android 4?
None of my classes start with the java.* prefix.
This is my project lib view:
It seems as though something is different with Android Studio, my project builds fine with both Ant and Eclipse.
The problem was related to ActionBarSherlock being built and using the support-v4 library too. The solution was to change the dependencies in the Library settings in Android Studio. Since I was already including ActionBarSherlock as a jar I just excluded it from being built at all.
This question helped: Intellij: android-support-v4.jar in included in actionBarSherlock and Project => IllegalArgumentException

Eclipse CDT build error

Hey guys i've worked on eclipse IDE for java till now.i want to switch to C++ now.i added a plugin to that eclipse from update.When i wrote a sample program am getting a question mark before the header inclusion and when iam trying to build the project its saying that error :
* Build of configuration Debug for project Helloworld *
(make: not found)
I'm going to bet you're on Windows and need a C++ compiler (including a 'make' utility). See http://www.mingw.org/wiki/HOWTO.