Code::Blocks Forums
User forums => Embedded development => Topic started by: RoCCaFeLLa on June 11, 2012, 01:31:03 pm
-
Hi to all.
I`m from Bulgaria.
I`m very new in programming but i have big interest in OOP with Openframeworks.
Can you help me with one project that i trying to build.
I have those files:
"main" C++ file
"servoApp" C++ file
and "ServoApp" header file
How to compile this files in one project and were to put them.
More info about this project:
he has to use webcam+OF+arduino+servos
I write the arduino program but can`t compile this files i dont know how.
-
No version, no examples, no error description, no build log -> no help.
Be aware, posts like that without any information at all might be silently deleted as they violate our forum rules. With such less information nobody on earth can help you. Sorry.
-
http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_I_posted_on_the_forums_that_Code::Blocks_was_not_working.2C_but_no_one_could_help_me.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_I_posted_on_the_forums_that_Code::Blocks_was_not_working.2C_but_no_one_could_help_me.3F)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)
-
sorry,here is the error window and files
[attachment deleted by admin]
-
looks to me like you have not set up your search directories and/or linker options in your projects build options properly.
-
and how to set it up ?
-
and how to set it up ?
How should we know without sample project and more information? Impossible. Either you provide enough information, or you won't get any help. Its as simple as that. We don't have magic balls to guess all your code, versions and setup. Sorry.
Edit: BTW: To see what you are doing wrong, try to answer my question:
I have a wxWidgets project, where I get compiler errors about undefined references. What am I doing wrong?
-
looks to me like you have not set up your search directories and/or linker options in your projects build options properly.
It seems that he doesn't have any project at all.
So...
Menu: File ->New -> Project
Select the one you want. (since you already have source, I think the empty Project could be a good start).
Then
Menu: Project -> Add files... (or recursively)
to add your existing files into the project.
Then
Menu: Project -> Build options...
to set up your configuration like include directories, libraries, ...
-
MortenMacFly sorry for still limited information.Here i provide all errors when i build the project.I use the latest version of code blocks and this project is for openframeworks.I follow the instructions there but still nothing.
||=== 1opit, Debug ===|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|2|error: ofMain.h: No such file or directory|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|3|error: ofxCvMain.h: No such file or directory|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|5|error: expected class-name before '{' token|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|11|error: 'ofVideoGrabber' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|12|error: 'ofVideoGrabber' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|14|error: 'ofxCvColorImage' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|15|error: 'ofxCvGrayscaleImage' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|16|error: 'ofxCvGrayscaleImage' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|18|error: 'ofxCvContourFinder' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.h|29|error: 'ofSerial' does not name a type|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp||In member function 'void servoApp::setup()':|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|5|error: 'ofSetFrameRate' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|9|error: 'serial' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|14|error: 'vidGrabber' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|16|error: 'colorImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|17|error: 'grayImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|18|error: 'bgImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|20|error: 'vidGrabber2' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp||In member function 'void servoApp::update()':|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|25|error: 'ofBackground' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|26|error: 'vidGrabber' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|27|error: 'vidGrabber2' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|32|error: 'colorImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|33|error: 'grayImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|36|error: 'bgImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|40|error: 'bgImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|44|error: 'contourFinder' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|61|error: 'ofGetFrameNum' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|63|error: 'serial' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|29|warning: unused variable 'len'|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp||In member function 'void servoApp::draw()':|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|75|error: 'ofSetColor' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|76|error: 'colorImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|77|error: 'grayImg' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|78|error: 'contourFinder' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|81|error: 'vidGrabber2' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp||In member function 'void servoApp::keyPressed(int)':|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|89|error: 'MAX' was not declared in this scope|
C:\Graduate work\ca_of_arduino\of_src\servoApp.cpp|91|error: 'MIN' was not declared in this scope|
||=== Build finished: 34 errors, 1 warnings ===|
-
I follow the instructions there but still nothing.
Ok, basically I give up:
- this is not the full build log
- obviously you didn't even bother to read the information on the links provided
- you seem unable to attach a simple example project/source code to your posts.
- ...and what "instructions" you are talking about? How should we know?
Maybe another one will pick-up the topic to answer you, I can't.
-
Turn on Full Compiler Logging http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
POST a full re-build log!
Post whether the header "ofMain.h" is a system header or not?
If NOT a system header, where is it relative to your CB project folder (the folder that contains your CB project file).
Edit: read this link also. http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F)
Tim S.
-
Do you realize that the openFrameworks is supposed to be compiled on the PC for running on the PC?
It is NOT supposed to be compiled to run on the Micro-controller in nearly all cases!
I based the above on reading this article.
http://www.creativeapplications.net/tutorials/arduino-servo-opencv-tutorial-openframeworks/ (http://www.creativeapplications.net/tutorials/arduino-servo-opencv-tutorial-openframeworks/)
Tim S.
-
http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_I_posted_on_the_forums_that_Code::Blocks_was_not_working.2C_but_no_one_could_help_me.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_I_posted_on_the_forums_that_Code::Blocks_was_not_working.2C_but_no_one_could_help_me.3F)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)