Hello, I am new to c/c++ programming and am trying to run the c/C++ hello world projects. I get the "Symbol "... " could not be resolved... Semantic Error". My research points to my project not having the correct files in it but I don't know which files to include to get the project to compile and run properly. Please help me get this going! Thanks!
Hi Matthew,
have a look at this useful wiki and keep us informed whether it helps. It should Getting unresolved symbols is usually from the linker not being able to find an include path.
http://processors.wiki.ti.com/index.php/Include_paths_and_options
Best Regards,Lisa
That's what I meant by my research told me it's probably the included file and I don't know which ones to include! I also assumed that saying the example problems told everyone that I was using the basic hello world examples for both c and c++ too. But I guess since you posted that link I need to clarify too; so here's the code for both examples. I have a general idea that I would need the header files that had the #include definitions in them correct? But I'm not sure where I would find them in the compiler folders or where to place them into the project so the compiler would find them. I read how to link the files but I don't know which ones to find. Sorry for assuming so much but I figured since this was a common occurrance someone would be able to point me in the right direction with the information I gave earlier! I am sure now there will be no more questions about it. Thanks!
#include <iostream>
using namespace std;
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0; }
The error codes are:
Symbol 'cout' could not be resolved Semantic Error
Symbol 'endl' could not be resolved Semantic Error
Symbol 'std' could not be resolved Semantic Error
and
#include <stdio.h>
#include <stdlib.h>
int main(void) {
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
return EXIT_SUCCESS; }
The error code is:
Symbol 'EXIT_SUCCESS' could not be resolved Semantic Error
Which files do I include into the linker and where do I put them into my project for these projects to compile and run?
Can someone please help me with this?!
we had forum issues which means I just now saw that you had responded. Let me have a quick look at get back to you shortly.
Best Regards,
Lisa
Hi,
matthew mangani Which files do I include into the linker and where do I put them into my project for these projects to compile and run?
what target are you using? Do you create a CCS project? If you create a CCS project there are some examples in the create project wizard which will have the necessary header files referenced.
One silly thing I see that might be the issue ... you have <iostream> ... should it not be <iostream.h>
Items like stdio and iostream should not need a special path added.
Please keep us informed.
Hello Rafael,
I imported the project into CCS (Version: 5.1.1.00031) and build it. There were many errors and cautions. 5554.testCase.log I inserted the log file. Hopefully this will point us in the right direction.
-Matt
I uninstalled everything and reinstalled ccs. I tried to import the project as a ccs project instead of a C++ project as before... I got this error: See details below. Error: Import failed for project 'Restrict_testcase' because its compiler definition is not available. Please contact support.
Please tell me how to fix this. Thank you.
Lisa,
I initially wrote I was using the hello world projects. I only used them to test out CCS.
Mattew,
The project was created for the C6000 devices, but it seems you don't have this family installed in your system. Can you tell which device you are using so I can adapt the testcase?
Cheers,
Rafael
No family was intended. I just wanted to run a c/c++ program to get refamiliar with it.
just thought I would check whether there is an update to your enquiry here.
Still waiting.
in CCS you need to assign a target to a project. If you do not have C6000 support installed you will get an error. What do you see under Window->Preferences->COde Composer Studio->Build->Code Generation Tools?
just wanted to check whether there was an update and whether you could provide the requested information.