Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hello,

Well over 6 months ago I used tyndal’s post to get gnude to compile C code for brew. Now I need to get some C++ code to compile. I have been searching though the forum for several hours now hoping to find a post like tyndal’s to explain how to compile C++ code. I have seen where you need to overload new and delete, but what to change in the make file is the information that I need. If there is a post that explains this then would you please point me to it, if there isn’t would someone who has done it please let me know what they did to get it to compile.

Thank you.

Hi man....
Am sending u the thread u searchin for...
http://brewforums.qualcomm.com/showthread.php?t=1601
hope this helps....
Keep enjoyin

Hi man....
Am sending u the thread u searchin for...
http://brewforums.qualcomm.com/showthread.php?t=1601
hope this helps....
Keep enjoyin

Thanks koolkartz,
However, that is tyndal’s thread that I referred to in the first post. It was very helpful in getting C to compile. But tyndal is very clear that it only works for a single C file. I have made it work with multiple C files and everything is great on that side. But there is no information on how to get C++ to work in that thread or any other thread that I have found. If there is information on getting C++ to work in that thread, then I have missed it the 4 times that I have read it in the past two days. If I am some how to dense to see it could you please copy the part that says it here?
What I need to know is what needs to be changed in the make file for it to compile C++? A generic make file for C/C++ would be a great help.
It also would be helpful if BREW would include C++ in their make file generator.

Thanks koolkartz,
However, that is tyndal’s thread that I referred to in the first post. It was very helpful in getting C to compile. But tyndal is very clear that it only works for a single C file. I have made it work with multiple C files and everything is great on that side. But there is no information on how to get C++ to work in that thread or any other thread that I have found. If there is information on getting C++ to work in that thread, then I have missed it the 4 times that I have read it in the past two days. If I am some how to dense to see it could you please copy the part that says it here?
What I need to know is what needs to be changed in the make file for it to compile C++? A generic make file for C/C++ would be a great help.
It also would be helpful if BREW would include C++ in their make file generator.

There is no real difference compiling C++ to C, I used arm-elf-g++ to compile and linked with -lsupc++ on my last title.
All the rest is the same as C.
tarshishim wrote:Thanks koolkartz,
However, that is tyndal’s thread that I referred to in the first post. It was very helpful in getting C to compile. But tyndal is very clear that it only works for a single C file. I have made it work with multiple C files and everything is great on that side. But there is no information on how to get C++ to work in that thread or any other thread that I have found. If there is information on getting C++ to work in that thread, then I have missed it the 4 times that I have read it in the past two days. If I am some how to dense to see it could you please copy the part that says it here?
What I need to know is what needs to be changed in the make file for it to compile C++? A generic make file for C/C++ would be a great help.
It also would be helpful if BREW would include C++ in their make file generator.

There is no real difference compiling C++ to C, I used arm-elf-g++ to compile and linked with -lsupc++ on my last title.
All the rest is the same as C.
tarshishim wrote:Thanks koolkartz,
However, that is tyndal’s thread that I referred to in the first post. It was very helpful in getting C to compile. But tyndal is very clear that it only works for a single C file. I have made it work with multiple C files and everything is great on that side. But there is no information on how to get C++ to work in that thread or any other thread that I have found. If there is information on getting C++ to work in that thread, then I have missed it the 4 times that I have read it in the past two days. If I am some how to dense to see it could you please copy the part that says it here?
What I need to know is what needs to be changed in the make file for it to compile C++? A generic make file for C/C++ would be a great help.
It also would be helpful if BREW would include C++ in their make file generator.

Thanks Steven Haggerty,
I just gave that a try and I am getting the same error. It is always saying unknown identifier when it hits "class". Did anyone have a similar problem and know what is wrong?

Thanks Steven Haggerty,
I just gave that a try and I am getting the same error. It is always saying unknown identifier when it hits "class". Did anyone have a similar problem and know what is wrong?

I found out why it was not like the class identifier, the header file was left out of the make file. Thanks Steven, your information worked.
The last problem I have is that it does not like modulus "%". Is there a math lib that I need to link to?

I found out why it was not like the class identifier, the header file was left out of the make file. Thanks Steven, your information worked.
The last problem I have is that it does not like modulus "%". Is there a math lib that I need to link to?

Link with -lm as with C, to include the maths libs. My linker libs flags were:
LIBS = -lsupc++ -lc -lm -lgcc
Steve.
tarshishim wrote:I found out why it was not like the class identifier, the header file was left out of the make file. Thanks Steven, your information worked.
The last problem I have is that it does not like modulus "%". Is there a math lib that I need to link to?

Link with -lm as with C, to include the maths libs. My linker libs flags were:
LIBS = -lsupc++ -lc -lm -lgcc
Steve.
tarshishim wrote:I found out why it was not like the class identifier, the header file was left out of the make file. Thanks Steven, your information worked.
The last problem I have is that it does not like modulus "%". Is there a math lib that I need to link to?

Thanks again Steven. This should get it working.

Thanks again Steven. This should get it working.

I'm having a bit a trouble when the make file gets to my c++ files. could someone who has gnude working with c++ post their make file?
here is the error i get while running nmake:
---------------------------------------------------------------
OBJECT BLOBBY~1.o
C:\GNUDE\bin\arm-elf-g++ -c -DDYNAMIC_APP -cpu ARM7TDMI -apcs /ropi/inte
rwork/norwpi -littleend -zo -fa -g -Ospace -O2 -I. -IC:\PROGRA~1\BREWSD~2.0\inc
-o BLOBBY~1.o BLOBBY~1.cpp
arm-elf-g++: cannot specify -o with -c or -S and multiple compilations
NMAKE : fatal error U1077: 'C:\GNUDE\bin\arm-elf-g++' : return code '0x1'
Stop.

I'm having a bit a trouble when the make file gets to my c++ files. could someone who has gnude working with c++ post their make file?
here is the error i get while running nmake:
---------------------------------------------------------------
OBJECT BLOBBY~1.o
C:\GNUDE\bin\arm-elf-g++ -c -DDYNAMIC_APP -cpu ARM7TDMI -apcs /ropi/inte
rwork/norwpi -littleend -zo -fa -g -Ospace -O2 -I. -IC:\PROGRA~1\BREWSD~2.0\inc
-o BLOBBY~1.o BLOBBY~1.cpp
arm-elf-g++: cannot specify -o with -c or -S and multiple compilations
NMAKE : fatal error U1077: 'C:\GNUDE\bin\arm-elf-g++' : return code '0x1'
Stop.

Im getting exactly the same problem.
Can anyone help ?
Also, am I supposed to have the AEEAppMod.c and AEEAppGen.c files in the Visual Studio project when I get it to make the makefile ?

Im getting exactly the same problem.
Can anyone help ?
Also, am I supposed to have the AEEAppMod.c and AEEAppGen.c files in the Visual Studio project when I get it to make the makefile ?

I'm getting the same error.
Should I modify the mak file or the templateCppAppTemplate.mak file?
Thanks.
I've figured it out. The long file name was the problem.

I'm getting the same error.
Should I modify the mak file or the templateCppAppTemplate.mak file?
Thanks.
I've figured it out. The long file name was the problem.

Please check the lightblue project which contains several C++ examples that use gnude as the compiler.
http://lightblue.tigris.org/

Please check the lightblue project which contains several C++ examples that use gnude as the compiler.
http://lightblue.tigris.org/

I am having this same problem with the modulus operator. Everywhere it is used the linker fails to link, giving this message:
"undefined reference to '__umodsi3'"
Does anyone know a solution to this problem, or willl I have to not use the modulus operator in my code?
Thanks

I am having this same problem with the modulus operator. Everywhere it is used the linker fails to link, giving this message:
"undefined reference to '__umodsi3'"
Does anyone know a solution to this problem, or willl I have to not use the modulus operator in my code?
Thanks