Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem exporting project settings
Problem exporting project settings [message #1763560] Wed, 17 May 2017 12:18 Go to next message
Rui Carvalho is currently offline Rui CarvalhoFriend
Messages: 1
Registered: May 2017
Junior Member
Hi!

I am working in a project in CDT (Luna) that has a custom Makefile for GNU ARM.
I have set some preprocessor macros that are set in the Makefile, to let CDT know about them for parsing the source code and avoiding the CDT to identify errors.
This was done here:
Project Properties->C/C++ General->Preprocessor Include Paths, Macros etc.->Entries tab->CDT User Setting Entries-> Add.

Now I want to export the whole project to a different computer.

I can export the source code successfully but not this preprocessor macros.
I've tried to export the projects settings like this:
Export->C/C++->C/C++ Project Settings->Next->Finish
but with no success: the exported file does not contain any of the preprocessor macros.

How can I do this, besides doing it manually?

Thanks.
Re: Problem exporting project settings [message #1763825 is a reply to message #1763560] Sun, 21 May 2017 08:34 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
May be a bug.
Exporting using Project Explorer --> <project> --> Export doesn't seem to work too well.
I trued it on one of my projects and, after selecting the configuration, it did output the User Entry macros but not the include paths.

The User Entries are kept in <project>/.settings/language.settings.xml
Perhaps you could copy it to the new project or appropriately modify the one in the new project.

EDIT:
I have store entries in project settings folder checked for CDT User Settings Entries in the Providers tab of
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.
[/EDIT]

Here's the language.settings.xml file for the Debug configuration.
(this is also a Makefile project).
It has only one macro DEBUGX=1 for C++ but not defined for C.

	<configuration id="cdt.managedbuild.toolchain.gnu.base.713860762.1017781130" name="Debug">
		<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
			<provider class="org.eclipse.cdt.core.language.settings.providers.LanguageSettingsGenericProvider" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider" name="CDT User Setting Entries" prefer-non-shared="true" store-entries-with-project="true">
				<language id="org.eclipse.cdt.core.g++">
					<resource project-relative-path="">
						<entry kind="includePath" name="/${ProjName}/hdr">
							<flag value="LOCAL|VALUE_WORKSPACE_PATH"/>
						</entry>
						<entry kind="includePath" name="/${ProjName}/Engine/hdr">
							<flag value="LOCAL|VALUE_WORKSPACE_PATH"/>
						</entry>
						<entry kind="includePath" name="/home/dvavra/proj/LOCALLIB/inc">
							<flag value="LOCAL"/>
						</entry>
						<entry kind="macro" name="DEBUGX" value="1"/>
					</resource>
				</language>
				<language id="org.eclipse.cdt.core.gcc">
					<resource project-relative-path="">
						<entry kind="includePath" name="/home/dvavra/proj/LOCALLIB/inc">
							<flag value="LOCAL"/>
						</entry>
						<entry kind="includePath" name="/${ProjName}/hdr">
							<flag value="LOCAL|VALUE_WORKSPACE_PATH"/>
						</entry>
						<entry kind="includePath" name="/${ProjName}/Engine/hdr">
							<flag value="LOCAL|VALUE_WORKSPACE_PATH"/>
						</entry>
					</resource>
				</language>
			</provider>
			<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="true" env-hash="-1066051144908541429" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} -std=c++11 ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;">
				<language-scope id="org.eclipse.cdt.core.gcc"/>
				<language-scope id="org.eclipse.cdt.core.g++"/>
			</provider>
			<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
		</extension>
	</configuration>

[Updated on: Sun, 21 May 2017 09:38]

Report message to a moderator

Previous Topic:Cross compiling using custom toolchain
Next Topic:make error in eclipse mars
Goto Forum:
  


Current Time: Thu Mar 28 17:53:44 GMT 2024

Powered by FUDForum. Page generated in 0.01938 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top