User forums > General (but related to Code::Blocks)

still trying to figure out where to put a (i think its called) a linking directi

(1/2) > >>

userx-bw:
I am using X11 and it seems from my searches on this subject to add the ole -lX11 to the command for compiler directives so codeblocks knows to compile with -lX11 so I will stop getting the "undefined reference XOpenDisplay" error when the rest of code blocks shows me ever header file for X11  as well as the function calls for X11 whenever I start to write one, including XOpenDisplay then tells gives me that error of "undefined reference XOpenDisplay" which is clearly a bug within CodeBlocks IDE interphase.

I placed this directive in the settings->compiler->other compiler settings as well as the other tab for other resource compiler options and it still has not stopped this behavior.

I cannot see why codeblocks knows to show me the header files when typing in #include X11 then a list popes up to pick from which X11 headers to use then when coding type XOp and a list pops up to pick which function call to use then when trying to compile something that codeblocks clearly knows that it gave me the header files to use and the function calls that go long with it, instead of actually compiling it gives me an error instead.

what kind of illogical mistake is that, and where do I have to add this directive -lX11 to get this Code::Blocks to stop being stupid?

stahta01:
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#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

Follow the directions in the "For your project :" section.

Tim S.

userx-bw:

--- Quote from: stahta01 on August 14, 2017, 06:08:13 pm ---http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#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

Follow the directions in the "For your project :" section.

Tim S.

--- End quote ---

I'll go dig in to that in a min, but first this comment ,

it does not excuse CODE:BLOCKS from knowing the header files and their function calls by showing me them before even telling it I will be using them in the special setting area to give it the path to the headers that it is showing me It already knows I have.

Then still having to add the path to where they are at when it already knows everything else about the X11 headers and their function calls. Just not that.

bad logical programming or laziness on the one that created this IDE?

userx-bw:

--- Quote from: stahta01 on August 14, 2017, 06:08:13 pm ---http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#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

Follow the directions in the "For your project :" section.

Tim S.

--- End quote ---

X11: /usr/bin/X11 /usr/lib64/X11 /etc/X11 /usr/include/X11 /usr/share/X11

search directories -> compiler -> add

added that path still get errors. how long as code blocks been around and how long will it take them to stop making this mistake of telling the user it knows every sticking header X11 has and all of the functions for X11 but has no idea where the header files are located especially on a Linux box?

just push it off on the user to figure out how to finish the their job

bad programming, and I am less then  an average programmer and can see that.

stahta01:
Please read the rules before you are banned!
http://forums.codeblocks.org/index.php/topic,9996.0.html

Hint: -llibraryname the -l implies it is a library name!!!

Tim S.
 

Navigation

[0] Message Index

[#] Next page

Go to full version