Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » multiplatform projects
multiplatform projects [message #137648] Fri, 04 February 2005 15:04 Go to next message
Eclipse UserFriend
Originally posted by: nik.cain.neuf.fr

My projects are compilable on both linux and windows (mingw), requiring
only a few different build settings (-DWin32 for example). However,
it seems that a CDT project has a single platform (ie GNU on Windows),
and I can't have a single project which can be either 'GNU' *or* 'GNU on
Windows' (depending on build configuration chosen, ie Win32_Debug,
Linux_Debug etc).

And since a folder can only have one project in it, I'm a bit stuck.

My only option looks like using standard makefiles, but I don't want to
do that since they give me a headache - is there any way to do this with
managed make?

nik
Re: multiplatform projects [message #137661 is a reply to message #137648] Fri, 04 February 2005 15:17 Go to previous messageGo to next message
Pelle Svensson is currently offline Pelle SvenssonFriend
Messages: 77
Registered: July 2009
Member
I think You can,

Project/Properties/C/C++ Build/Configuration/Tool Settings.


Add as many Configurations you need.
Change command line stuff under Tool Settings for each configuration.

Just don't know a easy way of changing active configuration without
going in to Properties again.

/

Nicholas Cain wrote:
> My projects are compilable on both linux and windows (mingw), requiring
> only a few different build settings (-DWin32 for example). However, it
> seems that a CDT project has a single platform (ie GNU on Windows), and
> I can't have a single project which can be either 'GNU' *or* 'GNU on
> Windows' (depending on build configuration chosen, ie Win32_Debug,
> Linux_Debug etc).
>
> And since a folder can only have one project in it, I'm a bit stuck.
>
> My only option looks like using standard makefiles, but I don't want to
> do that since they give me a headache - is there any way to do this with
> managed make?
>
> nik
Re: multiplatform projects [message #137685 is a reply to message #137661] Fri, 04 February 2005 15:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nik.cain.neuf.fr

I've set those settings in a new build configuration (clicking the
'Manage' button, I created Linux_Debug from the default Debug config - I
did this while running eclipse on linux, although the project was
originally created on windows), but it failed to build on linux. The
makefile created had this in it;

myTarget.so: $(OBJS) /home/me/otherlib/libblah.a
@echo 'Building target: $@'
null null $@ $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building: $@'

Those null's should be g++ and -o, just the same as the windows build.
In the Tool Settings Command box (when C++ Compiler item is selected) it
says g++

In the .cdtbuild file, the newly created Linux_Debug Configuration is;

<configuration
id="cdt.managedbuild.config.gnu.cygwin.lib.debug.747260194"
name="Linux_Debug" parent="cdt.managedbuild.config.gnu.cygwin.lib.debug"
artifactName="CMLicense"
errorParsers=" org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GC CErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse .cdt.core.GASErrorParser "
artifactExtension="a" cleanCommand="rm -rf">

It looks like it inherited the cygwin settings, so maybe that's messing
something up when running on linux. A further clue is in the C/C++ Build
dialog the project type is still 'Gnu on Windows' (uneditable, ie greyed
out).

nik

SpeedadeYxa wrote:
> I think You can,
>
> Project/Properties/C/C++ Build/Configuration/Tool Settings.
>
>
> Add as many Configurations you need.
> Change command line stuff under Tool Settings for each configuration.
>
> Just don't know a easy way of changing active configuration without
> going in to Properties again.
>
> /
>
> Nicholas Cain wrote:
>
>> My projects are compilable on both linux and windows (mingw),
>> requiring only a few different build settings (-DWin32 for example).
>> However, it seems that a CDT project has a single platform (ie GNU on
>> Windows), and I can't have a single project which can be either 'GNU'
>> *or* 'GNU on Windows' (depending on build configuration chosen, ie
>> Win32_Debug, Linux_Debug etc).
>>
>> And since a folder can only have one project in it, I'm a bit stuck.
>>
>> My only option looks like using standard makefiles, but I don't want
>> to do that since they give me a headache - is there any way to do this
>> with managed make?
>>
>> nik
Re: multiplatform projects [message #137697 is a reply to message #137685] Fri, 04 February 2005 16:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nik.cain.neuf.fr

I've found the problem - setting the artifact extension ( .exe ) to
nothing causes those nulls. Guess I'll just have to live with my
executables on linux having extensions for a while...

nik

Nicholas Cain wrote:
> I've set those settings in a new build configuration (clicking the
> 'Manage' button, I created Linux_Debug from the default Debug config - I
> did this while running eclipse on linux, although the project was
> originally created on windows), but it failed to build on linux. The
> makefile created had this in it;
>
> myTarget.so: $(OBJS) /home/me/otherlib/libblah.a
> @echo 'Building target: $@'
> null null $@ $(OBJS) $(USER_OBJS) $(LIBS)
> @echo 'Finished building: $@'
>
> Those null's should be g++ and -o, just the same as the windows build.
> In the Tool Settings Command box (when C++ Compiler item is selected) it
> says g++
>
> In the .cdtbuild file, the newly created Linux_Debug Configuration is;
>
> <configuration
> id="cdt.managedbuild.config.gnu.cygwin.lib.debug.747260194"
> name="Linux_Debug" parent="cdt.managedbuild.config.gnu.cygwin.lib.debug"
> artifactName="CMLicense"
> errorParsers=" org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GC CErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse .cdt.core.GASErrorParser "
> artifactExtension="a" cleanCommand="rm -rf">
>
> It looks like it inherited the cygwin settings, so maybe that's messing
> something up when running on linux. A further clue is in the C/C++ Build
> dialog the project type is still 'Gnu on Windows' (uneditable, ie greyed
> out).
>
> nik
>
> SpeedadeYxa wrote:
>
>> I think You can,
>>
>> Project/Properties/C/C++ Build/Configuration/Tool Settings.
>>
>>
>> Add as many Configurations you need.
>> Change command line stuff under Tool Settings for each configuration.
>>
>> Just don't know a easy way of changing active configuration without
>> going in to Properties again.
>>
>> /
>>
>> Nicholas Cain wrote:
>>
>>> My projects are compilable on both linux and windows (mingw),
>>> requiring only a few different build settings (-DWin32 for
>>> example). However, it seems that a CDT project has a single platform
>>> (ie GNU on Windows), and I can't have a single project which can be
>>> either 'GNU' *or* 'GNU on Windows' (depending on build configuration
>>> chosen, ie Win32_Debug, Linux_Debug etc).
>>>
>>> And since a folder can only have one project in it, I'm a bit stuck.
>>>
>>> My only option looks like using standard makefiles, but I don't want
>>> to do that since they give me a headache - is there any way to do
>>> this with managed make?
>>>
>>> nik
Re: multiplatform projects [message #137709 is a reply to message #137697] Fri, 04 February 2005 16:20 Go to previous message
Eclipse UserFriend
Originally posted by: nik.cain.neuf.fr

ah, perhaps not the entire problem - shared objects still produce that
'null null' in the makefile, reagardless of extension...

Any help would be much appreciated,
nik

Nicholas Cain wrote:
> I've found the problem - setting the artifact extension ( .exe ) to
> nothing causes those nulls. Guess I'll just have to live with my
> executables on linux having extensions for a while...
>
> nik
>
> Nicholas Cain wrote:
>
>> I've set those settings in a new build configuration (clicking the
>> 'Manage' button, I created Linux_Debug from the default Debug config -
>> I did this while running eclipse on linux, although the project was
>> originally created on windows), but it failed to build on linux. The
>> makefile created had this in it;
>>
>> myTarget.so: $(OBJS) /home/me/otherlib/libblah.a
>> @echo 'Building target: $@'
>> null null $@ $(OBJS) $(USER_OBJS) $(LIBS)
>> @echo 'Finished building: $@'
>>
>> Those null's should be g++ and -o, just the same as the windows build.
>> In the Tool Settings Command box (when C++ Compiler item is selected)
>> it says g++
>>
>> In the .cdtbuild file, the newly created Linux_Debug Configuration is;
>>
>> <configuration
>> id="cdt.managedbuild.config.gnu.cygwin.lib.debug.747260194"
>> name="Linux_Debug"
>> parent="cdt.managedbuild.config.gnu.cygwin.lib.debug"
>> artifactName="CMLicense"
>> errorParsers=" org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GC CErrorParser;org.eclipse.cdt.core..GLDErrorParser;org.eclips e.cdt.core.GASErrorParser "
>> artifactExtension="a" cleanCommand="rm -rf">
>>
>> It looks like it inherited the cygwin settings, so maybe that's
>> messing something up when running on linux. A further clue is in the
>> C/C++ Build dialog the project type is still 'Gnu on Windows'
>> (uneditable, ie greyed out).
>>
>> nik
>>
>> SpeedadeYxa wrote:
>>
>>> I think You can,
>>>
>>> Project/Properties/C/C++ Build/Configuration/Tool Settings.
>>>
>>>
>>> Add as many Configurations you need.
>>> Change command line stuff under Tool Settings for each configuration.
>>>
>>> Just don't know a easy way of changing active configuration without
>>> going in to Properties again.
>>>
>>> /
>>>
>>> Nicholas Cain wrote:
>>>
>>>> My projects are compilable on both linux and windows (mingw),
>>>> requiring only a few different build settings (-DWin32 for
>>>> example). However, it seems that a CDT project has a single platform
>>>> (ie GNU on Windows), and I can't have a single project which can be
>>>> either 'GNU' *or* 'GNU on Windows' (depending on build configuration
>>>> chosen, ie Win32_Debug, Linux_Debug etc).
>>>>
>>>> And since a folder can only have one project in it, I'm a bit stuck.
>>>>
>>>> My only option looks like using standard makefiles, but I don't want
>>>> to do that since they give me a headache - is there any way to do
>>>> this with managed make?
>>>>
>>>> nik
Previous Topic:Moving CDT Projects between Mac and PC via CVS
Next Topic:Navigation to method implementation
Goto Forum:
  


Current Time: Thu Oct 10 12:21:33 GMT 2024

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

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

Back to the top