Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - C++ Windows/Linux cross-compile issue: (2 Items)
   
C++ Windows/Linux cross-compile issue  
Greetings all,

I apologize in advance--I wasn't sure what the appropriate forum for this question was.  

I am currently using the 6.3.2 Momentics IDE on either Windows or Linux (I've installed both versions).  I am trying to 
cross-compile a C++ application to run on a Neutrino system.  It seems no matter what project type I pick when I start a
 new project in Momentics that I always end up using the C compiler in lieu of a C++ compiler.  

I've noticed that the IDE seems to a "gcc" as an argument to qcc--I can clearly see the "g++" in the same directory but 
can't get Momentics to use it (I would like to use the 3.3.5 g++).  You can imagine the errors I'm getting--the C 
compiler doesn't like anything from the std library realms--it doesn't even recognize "memcpy" (because of <cstring> 
versus <string.h>)--in addition to many other issues.  

I'd ideally like to figure out what I'm doing wrong, so hopefully someone here can help.  In the meantime I'm going to 
do things the old fashioned way and try making my own makefile and using the command line.  

Thanks,
Mike
Re: C++ Windows/Linux cross-compile issue  
I just would like to ask you what is the extension of your source files? How do you know that it is C, not C++ compiler 
is processing your files? Does it not understand C++ constructions or something else? qcc is just compiler driver, it 
invokes real compiler, but in order to see what it runs, special command line options should be applied. In terms of 
building if you select C++ project, this is what builder adds to the common.mk file:

# Next lines are for C++ projects only
EXTRA_SUFFIXES+=cxx cpp
LDFLAGS+=-lang-c++
VFLAG_g=-gstabs+

Detection of compiler type is still qcc responsibility.