User forums > Help
undefined reference to `Direct3DCreate8@4
jokerar:
as to the 'Linker Option' thing, there are so many lib files that
i just included 3 of them to try:
d3d8.lib
d3dx.lib
d3dx8.lib
but in vain. problem remained.
jokerar:
hi, its ok now, i own that i made a mistake with my code,
these are original lines:
// Include files
#include <windows.h>
#include <stdio.h>
#include "d3d8.h"
#include "d3dx8.h"
i changed the last two to:
#include <d3d8.h>
#include <d3dx8.h>
and it compiles. But is it possible to make codeblock search for default include directories
'after' it searched the working directories if the files could not be found there? thanks.
darklordsatan:
I dont quite understand what you mean.
If you look at the Directories->Compiler tabs (in compiler options), where you put the include dirs, you see there are some arrows (I forgot the real name of that widget :D). The compiler will try to look for headers (or libs, if in the Directories->Linker tabs) in the given order, so you can use the aforementioned arrows to change the precedence of such dirs (which one will be looked for first, second, and so on).
In the case of having two dirs, one in the global compiler setting an another in the local project compiler settings, my bet is that it searches for the local settings first and then tries to look at the global settings.
Is this what you're asking?
rickg22:
I think you need to add the libraries in the *project* settings rather than the global settings. The project settings override the global settings.
Ceniza:
--- Quote from: jokerar ---But is it possible to make codeblock search for default include directories 'after' it searched the working directories if the files could not be found there?
--- End quote ---
If I get your question right the answer would be: it's the compiler's job.
All Code::Blocks would do is to add a few -I when calling the compiler (to tell the compiler there're extra include directories) but, after that, it's all in the compiler's "hands".
Just try to keep the convention in mind: #include <header> for headers in global directories (the ones added with -I count there) and #include "header" for headers in the current directory.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version