User forums > Using Code::Blocks

Global Variable editor

<< < (3/3)

stahta01:

--- Code: ---the variable name libxml

BASE:C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64
INCLUDE:C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64
LIB:C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64

and my build options menu:
compiler tab  $(#libxml.include)
linker tab      $(#libxml.lib)

and include directive
#include <libxml\libxml2\libxml\xmlmemory.h>

--- End code ---

The above will result in
$(#libxml.lib) being "C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64"
$(#libxml.include) being "C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64"

What you likely would want is

--- Code: ---BASE:C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64
INCLUDE:
LIB:

--- End code ---

Which will result in
$(#libxml.lib) being "C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64\lib"
$(#libxml.include) being "C:\Users\MyComputer\Desktop\Libxml2\libxml2-2.9.3-win32-x86_64\include"

Edit: And most software would include include <libxml\xmlmemory.h> or <xmlmemory.h> instead of <libxml\libxml2\libxml\xmlmemory.h>

Edit2: The slash was wrong! And most software would include <libxml/xmlmemory.h> or <xmlmemory.h>

Tim S.


SelfTeachingC++:
Well, it seems I'm just not going to understand this because that doesn't work for me either. shrug.

stahta01:

--- Quote from: SelfTeachingC++ on June 01, 2020, 04:47:03 pm ---Well, it seems I'm just not going to understand this because that doesn't work for me either. shrug.

--- End quote ---

If you learn to read and understand the CB build log you likely will be able to figure it out!
NOTE: Just looking at build messages you will never figure it out.

Tim S.

Navigation

[0] Message Index

[*] Previous page

Go to full version