Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: VonZorch on December 14, 2013, 06:23:16 am
-
I have finally managed to get my project to compile but I get an error from linking.
I think it has to do with Code::Blocks linker settings.
Build log output,
-------------- Build: Debug in GrUFFF (compiler: GNU GCC Compiler)---------------
g++ -L/usr/include/wx-2.8/ -o bin/Debug/GrUFFF obj/Debug/frmGrUFFF.o obj/Debug/main.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -pg /usr/include/wx-2.8/
/usr/bin/ld: cannot find /usr/include/wx-2.8/: File format not recognized
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)
, the error is in bold, /usr/include/wx-2.8/ does exist.
This is my first project in C++ and my first use of Code::Blocks, so assume that I do not know the simplest, most obvious things. Experts tend to forget that what is obvious to them is completely unknown to beginners.
The project currently is just the user interface, it doesn't do any thing yet, might that be the problem?
If this is not the proper place for my post kindly point me in the right direction.
-
"/usr/include/wx-2.8"
Does this folder exist?
Did you install wxWidgets/wxGTK 2.8 development library?
If NOT, do so.
If yes, does wx-config work?
Tim S.
-
I think there is a problem with your project or global compiler options.
You've placed "/usr/include/wx-2.8" in a place where you should not have done so.
-
Tim S. yes on all accounts.
oBFusCATed, I haven't placed anything, everything is from a default install. As for compiler options, note complete beginner here, I don't know enough about Code::Blocks or C++ to have an idea what I need to set. The manual is written for someone with at least basic knowledge. Where can I find that sort of information targeted for someone starting with no background knowledge?
-
oBFusCATed, I haven't placed anything, everything is from a default install. As for compiler options, note complete beginner here, I don't know enough about Code::Blocks or C++ to have an idea what I need to set. The manual is written for someone with at least basic knowledge. Where can I find that sort of information targeted for someone starting with no background knowledge?
Read this link 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)
Please use the "For your project " setting till you know what you are doing.
NOTE: If you changed the "For global environment" you may NEED to undo the changes!
Check: The "Compiler Settings" -> "Other Options" and "Linker Settings" -> "Other Linker Options" for problems.
Tim S.
-
oBFusCATed, I haven't placed anything, everything is from a default install.
If that's the truth, you have a broken OS/install.
This is definitely not the output of a default install or a wizard created project, at least not from one of our wizards or from wx-config.