Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Compiler Cpp apvector (apmatrix) errors with C++ 2011(Too may errors, codewarrior to eclipse transition)
Compiler Cpp apvector (apmatrix) errors with C++ 2011 [message #1744264] Fri, 23 September 2016 17:16 Go to next message
Adam Ziccardi is currently offline Adam ZiccardiFriend
Messages: 4
Registered: September 2016
Junior Member
We used Metrowerks CodeWarrior for years in our HS Cpp class.
Transitioning to eclipse we've done the MinGW installs, used the right toolchains etc.. Hello World works OK as does OneDWalk project in the attached project folder.
When we added position.h, position.cpp, utils.h, utils.cpp, apstring.h, apstring.cpp we get errors about files not compiling, not found libraries, etc. When we add the files it's looking for , more errors of the same kind happen.
We really want eclipse to work so we can toggle from Cpp to java and back. Python is going to happen here this year, too. These projects should run right out of the box , as is, and they don't. We're using Neon, updated MinGW, Win 7.
All project files are attached as well as the library of files we'd like to use.
FirstCpp is an eclipse project copied right from the workspace that is giving me guff for the last week and a half.
If there's any Eclipse Cpp masters in Western NY, I can arrange a visit.
If there's any awesome HS appropriate Cpp projects , send me some links, please.
Thanks
Adam Z

  • Attachment: Fish Sim.zip
    (Size: 54.13KB, Downloaded 100 times)
  • Attachment: One Walk.zip
    (Size: 21.72KB, Downloaded 100 times)
  • Attachment: firstCpp.zip
    (Size: 108.45KB, Downloaded 129 times)

[Updated on: Tue, 25 October 2016 13:05]

Report message to a moderator

Re: Compiler Cpp in High SChool class help [message #1744314 is a reply to message #1744264] Sat, 24 September 2016 22:05 Go to previous messageGo to next message
David VavraFriend
Messages: 1417
Registered: October 2012
Senior Member
The first thing you might want to do is fix the C++ problems then worry about Eclipse.

I downloaded firstCpp and imported it.
I'm using Linux but tried to compile it anyway (actually Eclipse tried).

utils.cpp had an error:
line 50: void Sort(apvector<Fish> & list, int numElts)

After searching for "apvector", I found a line where the include for it was commented out (utils.h line 19).
The header file apvector.h is not in the project.

I couldn't find any declaration for class Fish.
But there is a commented out include for fish.h in utils.h line 20
There is no file fish.h in the project.


The build log:
17:31:17 **** Rebuild of configuration Debug for project firstCpp ****
Info: Configuration "Debug" uses tool-chain "MinGW GCC" that is unsupported on this system, attempting to build anyway.
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o src/position.o ../src/position.cpp 
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o src/utils.o ../src/utils.cpp 
../src/utils.cpp:50:11: error: variable or field 'Sort' declared void
 void Sort(apvector<Fish> & list, int numElts)
           ^
../src/utils.cpp:50:11: error: 'apvector' was not declared in this scope
../src/utils.cpp:50:20: error: 'Fish' was not declared in this scope
 void Sort(apvector<Fish> & list, int numElts)
                    ^
../src/utils.cpp:50:28: error: 'list' was not declared in this scope
 void Sort(apvector<Fish> & list, int numElts)
                            ^
../src/utils.cpp:50:34: error: expected primary-expression before 'int'
 void Sort(apvector<Fish> & list, int numElts)
                                  ^

17:31:18 Build Finished (took 803ms)



No wonder you had grief.
I didn't bother with the other projects.

Re: Compiler Cpp in High SChool class help [message #1744317 is a reply to message #1744314] Sun, 25 September 2016 01:58 Go to previous messageGo to next message
Adam Ziccardi is currently offline Adam ZiccardiFriend
Messages: 4
Registered: September 2016
Junior Member
Well, that's embarrassing... Shocked
I'll check my source files Monday AM and see how it goes. Someone must have horsed around with our source...I can teach and remind to Save AS... but they forget sometimes..
AZ
Re: Compiler Cpp in High SChool class help [message #1745062 is a reply to message #1744317] Tue, 04 October 2016 17:31 Go to previous messageGo to next message
Adam Ziccardi is currently offline Adam ZiccardiFriend
Messages: 4
Registered: September 2016
Junior Member
No Message Body
  • Attachment: Fish Sim.zip
    (Size: 54.13KB, Downloaded 103 times)

[Updated on: Tue, 25 October 2016 12:50]

Report message to a moderator

Re: Compiler Cpp in High SChool class help [message #1745173 is a reply to message #1745062] Thu, 06 October 2016 00:30 Go to previous messageGo to next message
David VavraFriend
Messages: 1417
Registered: October 2012
Senior Member
You seem reluctant to show exactly what is giving you problems.
Instead, you are uploading your project expecting others to download it and magically know what is wrong.
Then provide fixes.
This is not the place for free consulting.

With the firstCpp project, you demonstrated that you are inclined to blame your tools for your mistakes.
You teach? If you can't solve your own problems how are you going to deal with beginner ones?

If you have specific questions, please ask them.
Otherwise, it's likely best you go back to what you've found that works.

[Updated on: Thu, 06 October 2016 13:50]

Report message to a moderator

Re: Compiler Cpp in High SChool class help [message #1746215 is a reply to message #1745173] Tue, 25 October 2016 13:03 Go to previous message
Adam Ziccardi is currently offline Adam ZiccardiFriend
Messages: 4
Registered: September 2016
Junior Member
Final disposition and report for future searches by anyone else in this situation:
The problem is that apvector (and hence apmatrix) is no// longer supported by C++. (#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=gnu++111 compiler options.)
The Metrowerks IDE is long gone before 2011, it has settings to run certain projects without explicit #include's for every single file.
Thanks for the efforts here.
AZ
Previous Topic:preprocessor define is not saved
Next Topic:Error color
Goto Forum:
  


Current Time: Fri Jan 28 10:00:41 GMT 2022

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

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

Back to the top