build gcc4.9 under suse10 some vars was not declared - suse

I build gcc4.9 with the following step
wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.9.0/gcc-4.9.0.tar.gz
tar -zxvf gcc-4.9.0.tar.gz
cd gcc-4.9.0
./contrib/download_prerequisites
cd ..
mkdir gcc-build-4.9.0
cd gcc-build-4.9.0
../gcc-4.9.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j4
it show the error message:
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:232:27: error: ‘PTRACE_GETSIGINFO’ was not declared in this scope
int ptrace_getsiginfo = PTRACE_GETSIGINFO;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:233:27: error: ‘PTRACE_SETSIGINFO’ was not declared in this scope
int ptrace_setsiginfo = PTRACE_SETSIGINFO;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:390:30: error: ‘EVIOCGREP’ was not declared in this scope
unsigned IOCTL_EVIOCGREP = EVIOCGREP;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:399:30: error: ‘EVIOCSREP’ was not declared in this scope
unsigned IOCTL_EVIOCSREP = EVIOCSREP;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:682:36: error: ‘FS_IOC_GETFLAGS’ was not declared in this scope
unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:683:38: error: ‘FS_IOC_GETVERSION’ was not declared in this scope
unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:684:36: error: ‘FS_IOC_SETFLAGS’ was not declared in this scope
unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
^
../../../../gcc-4.9.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:685:38: error: ‘FS_IOC_SETVERSION’ was not declared in this scope
unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
^
make[4]: *** [sanitizer_platform_limits_posix.lo] Error 1
I try to rebuild, but it show the error again.

Related

hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:559:35: error: use of undeclared identifier 'QCOM'

I realize I need to define QCOM has the vendor somewhere, but which file / where is this typically declared?
I am getting the following exception while building the ROM for a lineageos project and need some help diagnosing and resolving the issue:
-MD -MF /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/libsdmcore_intermediates/drm/hw_info_drm.d -o /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/libsdmcore_intermediates/drm/hw_info_drm.o hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp"
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:559:35: error: use of undeclared identifier 'QCOM'
if (drm_format_modifier == (DRM_FORMAT_MOD_QCOM_COMPRESSED |
^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:58:56: note: expanded from macro 'DRM_FORMAT_MOD_QCOM_COMPRESSED'
#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:560:11: error: use of undeclared identifier 'QCOM'
DRM_FORMAT_MOD_QCOM_DX | DRM_FORMAT_MOD_QCOM_TIGHT)) {
^
hardware/qcom/display-caf/msm8996/sdm/libs/core/drm/hw_info_drm.cpp:61:48: note: expanded from macro 'DRM_FORMAT_MOD_QCOM_DX'
#define DRM_FORMAT_MOD_QCOM_DX fourcc_mod_code(QCOM, 0x2)
^
Device tree:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1
Vendor tree:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1
Kernel source:= https://github.com/dazza5000/android_kernel_lenovo_msm8937/tree/tb8504f
ROM Source:= https://github.com/LineageOS/android
Command:
repo sync -j20 && source build/envsetup.sh && breakfast tb8504f && make -j20 | tee rom.log
Full log:
https://del.dog/ujizecehug
I don't know the long term fix for this issue, but my quick and dirty fix was to define the variable in both of the files that depend on it.
I went into the file hw_info_drm.cpp and added the following at the top:
#define QCOM 1

Clang-tidy false positive with boost::variant

When running clang-tidy on this minimal example posted below I get the (imho) false positive error from clang-tidy (full error trace at the end)
Value assigned to field 'id' in implicit constructor is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
The code does nothing but assign a boost::variant to one of the two values. The error is gone if I replace the copy constructor by Size(const Size& sz) = default;. However, I cannot do this, since the Size is a cv::Size in the real code.
Even though it might not be as elegant as possible, I don't see any error with this. Can somebody point me into the direction if I am mistaken, clang-tidy or boost.
#include <boost/variant.hpp>
class Size
{
public:
Size() = default;
Size(const Size &sz) : width(sz.width) {}
int width{0};
};
struct B {
Size size;
};
struct A {
Size size;
uint32_t id{0};
};
int main() {
using T = boost::variant<A, B>;
T config = B();
}
I am running:
clang-tools-extra commit 50fe75789f08b96284d2c14cb6583b3783c74460
llvm commit afb8c1fed21eb4848d86f2d28e9cb3afcfbb2656
boost 1.67
Full error dump:
test_variant.cc:15:8: warning: Value assigned to field 'id' in implicit constructor is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
struct A {
^
test_variant.cc:22:5: note: Calling move constructor for 'variant'
T config = B();
^
libraries/boost/include/boost/variant/variant.hpp:1880:9: note: Calling 'variant::internal_apply_visitor'
operand.internal_apply_visitor(visitor);
^
libraries/boost/include/boost/variant/variant.hpp:2466:16: note: Calling 'variant::internal_apply_visitor_impl'
return internal_apply_visitor_impl(
^
libraries/boost/include/boost/variant/variant.hpp:2452:16: note: Calling 'visitation_impl'
return detail::variant::visitation_impl(
^
libraries/boost/include/boost/variant/detail/visitation_impl.hpp:225:5: note: Control jumps to 'case 0:' at line 238
switch (logical_which)
^
libraries/boost/include/boost/variant/detail/visitation_impl.hpp:240:11: note: Calling 'visitation_impl_invoke'
, BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE
^
libraries/boost/include/boost/preprocessor/repetition/repeat.hpp:29:26: note: expanded from macro 'BOOST_PP_REPEAT'
# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
^
libraries/boost/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
^
libraries/boost/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
# define BOOST_PP_CAT_I(a, b) a ## b
^
note: (skipping 21 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
libraries/boost/include/boost/preprocessor/repetition/repeat.hpp:53:56: note: expanded from macro 'BOOST_PP_REPEAT_1_2'
# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d)
^
libraries/boost/include/boost/preprocessor/repetition/repeat.hpp:52:36: note: expanded from macro 'BOOST_PP_REPEAT_1_1'
# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
^
libraries/boost/include/boost/variant/detail/visitation_impl.hpp:231:16: note: expanded from macro 'BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE'
return (visitation_impl_invoke)( \
^
libraries/boost/include/boost/variant/detail/visitation_impl.hpp:154:12: note: Calling 'visitation_impl_invoke_impl'
return (visitation_impl_invoke_impl)(
^
libraries/boost/include/boost/variant/detail/visitation_impl.hpp:112:12: note: Calling 'move_into::internal_visit'
return visitor.internal_visit(
^
libraries/boost/include/boost/variant/variant.hpp:507:23: note: Calling implicit move constructor for 'A'
new(storage_) T(::boost::detail::variant::move(operand));
^
test_variant.cc:15:8: note: Value assigned to field 'id' in implicit constructor is garbage or undefined
struct A {

Tk/Tcl extensions: error while compile BLT

I am compile BLT under OS X 10.10.5, while I make after ./configure, some error occur here:
FDSM_lhn#Nirvana:~/Downloads/blt2.4z$ sudo make -I/opt/X11/include
Password:
(cd src; /Applications/Xcode.app/Contents/Developer/usr/bin/make all)
gcc -c -Wall -O6 -I. -I. bltAlloc.c
warning: optimization level '-O6' is not supported; using '-O3' instead
In file included from bltAlloc.c:1:
In file included from ./bltInt.h:80:
./bltNsUtil.h:50:20: error: conflicting types for 'Tcl_FindCommand'
EXTERN Tcl_Command Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp *interp,
^
/usr/local/include/tclDecls.h:1486:20: note: previous declaration is here
EXTERN Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, const char *name,
^
In file included from bltAlloc.c:1:
In file included from ./bltInt.h:80:
./bltNsUtil.h:67:23: error: conflicting types for 'Tcl_CreateNamespace'
EXTERN Tcl_Namespace *Tcl_CreateNamespace _ANSI_ARGS_((Tcl_Interp *interp,
^
/usr/local/include/tclDecls.h:1460:24: note: previous declaration is here
EXTERN Tcl_Namespace * Tcl_CreateNamespace(Tcl_Interp *interp,
^
In file included from bltAlloc.c:1:
In file included from ./bltInt.h:80:
./bltNsUtil.h:72:23: error: conflicting types for 'Tcl_FindNamespace'
EXTERN Tcl_Namespace *Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp *interp,
^
/usr/local/include/tclDecls.h:1482:24: note: previous declaration is here
EXTERN Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp,
^
In file included from bltAlloc.c:1:
In file included from ./bltInt.h:80:
./bltNsUtil.h:75:12: error: conflicting types for 'Tcl_Export'
EXTERN int Tcl_Export _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Namespace *nsPtr,
^
/usr/local/include/tclDecls.h:1469:13: note: previous declaration is here
EXTERN int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr,
^
1 warning and 4 errors generated.
make[1]: *** [bltAlloc.o] Error 1
make: *** [all] Error 2
What should I do to avoid this?
You're working with an elderly codebase, so some surgery is required. Alas.
The four offending declarations in bltNsUtil.h need to be removed as Tcl now declares them properly; Tcl_FindCommand, Tcl_CreateNamespace, Tcl_FindNamespace and Tcl_Export are part of Tcl's public API and have been for years. (The problem declarations are on lines 50, 67, 72, and 75, plus probably one or two lines further in each case.)
Also, you're recommended to not use sudo while doing the build itself, but rather just when doing the install afterwards. Mere compilation of the code shouldn't require elevated permissions.

NVML code doesn't compile

I am implementing an example program with nvml library as shown at https://devtalk.nvidia.com/default/topic/504951/how-to-call-nvml-apis-/
The program is as follows:
#include <stdio.h>
#include <nvidia/gdk/nvml.h>
const char * convertToComputeModeString(nvmlComputeMode_t mode)
{
switch (mode)
{
case NVML_COMPUTEMODE_DEFAULT:
return "Default";
case NVML_COMPUTEMODE_EXCLUSIVE_THREAD:
return "Exclusive_Thread";
case NVML_COMPUTEMODE_PROHIBITED:
return "Prohibited";
case NVML_COMPUTEMODE_EXCLUSIVE_PROCESS:
return "Exclusive Process";
default:
return "Unknown";
}
}
int main()
{
nvmlReturn_t result;
unsigned int device_count, i;
// First initialize NVML library
result = nvmlInit();
if (NVML_SUCCESS != result)
{
printf("Failed to initialize NVML: %s\n", nvmlErrorString(result));
printf("Press ENTER to continue...\n");
getchar();
return 1;
}
result = nvmlDeviceGetCount(&device_count);
if (NVML_SUCCESS != result)
{
printf("Failed to query device count: %s\n", nvmlErrorString(result));
goto Error;
}
printf("Found %d device%s\n\n", device_count, device_count != 1 ? "s" : "");
printf("Listing devices:\n");
for (i = 0; i < device_count; i++)
{
nvmlDevice_t device;
char name[64];
nvmlPciInfo_t pci;
nvmlComputeMode_t compute_mode;
// Query for device handle to perform operations on a device
// You can also query device handle by other features like:
// nvmlDeviceGetHandleBySerial
// nvmlDeviceGetHandleByPciBusId
result = nvmlDeviceGetHandleByIndex(i, &device);
if (NVML_SUCCESS != result)
{
printf("Failed to get handle for device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
result = nvmlDeviceGetName(device, name, sizeof(name)/sizeof(name[0]));
if (NVML_SUCCESS != result)
{
printf("Failed to get name of device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
// pci.busId is very useful to know which device physically you're talking to
// Using PCI identifier you can also match nvmlDevice handle to CUDA device.
result = nvmlDeviceGetPciInfo(device, &pci);
if (NVML_SUCCESS != result)
{
printf("Failed to get pci info for device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
printf("%d. %s [%s]\n", i, name, pci.busId);
// This is a simple example on how you can modify GPU's state
result = nvmlDeviceGetComputeMode(device, &compute_mode);
if (NVML_ERROR_NOT_SUPPORTED == result)
printf("\t This is not CUDA capable device\n");
else if (NVML_SUCCESS != result)
{
printf("Failed to get compute mode for device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
else
{
// try to change compute mode
printf("\t Changing device's compute mode from '%s' to '%s'\n",
convertToComputeModeString(compute_mode),
convertToComputeModeString(NVML_COMPUTEMODE_PROHIBITED));
result = nvmlDeviceSetComputeMode(device, NVML_COMPUTEMODE_PROHIBITED);
if (NVML_ERROR_NO_PERMISSION == result)
printf("\t\t Need root privileges to do that: %s\n", nvmlErrorString(result));
else if (NVML_ERROR_NOT_SUPPORTED == result)
printf("\t\t Compute mode prohibited not supported. You might be running on\n"
"\t\t windows in WDDM driver model or on non-CUDA capable GPU.\n");
else if (NVML_SUCCESS != result)
{
printf("\t\t Failed to set compute mode for device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
else
{
printf("\t Restoring device's compute mode back to '%s'\n",
convertToComputeModeString(compute_mode));
result = nvmlDeviceSetComputeMode(device, compute_mode);
if (NVML_SUCCESS != result)
{
printf("\t\t Failed to restore compute mode for device %i: %s\n", i, nvmlErrorString(result));
goto Error;
}
}
}
}
result = nvmlShutdown();
if (NVML_SUCCESS != result)
printf("Failed to shutdown NVML: %s\n", nvmlErrorString(result));
printf("All done.\n");
printf("Press ENTER to continue...\n");
getchar();
return 0;
Error:
result = nvmlShutdown();
if (NVML_SUCCESS != result)
printf("Failed to shutdown NVML: %s\n", nvmlErrorString(result));
printf("Press ENTER to continue...\n");
getchar();
return 1;
}
makefile as follows:
ARCH := $(shell getconf LONG_BIT)
ifeq (${ARCH},32)
NVML_LIB := ../lib/
else ifeq (${ARCH},64)
NVML_LIB := /usr/lib/nvidia-340/
else
$(error Unknown architecture!)
endif
CFLAGS := -I ../inc
LDFLAGS := -lnvidia-ml -L $(NVML_LIB)
example: example.o
$(CC) $(LDFLAGS) $< -o $#
clean:
-#rm -f example.o
-#rm -f example
And the error I get is:
cc -lnvidia-ml -L /usr/src/gdk/nvml/lib/ example.o -o example
example.o: In function `main':
example.c:(.text+0x5f): undefined reference to `nvmlInit_v2'
example.c:(.text+0x7b): undefined reference to `nvmlErrorString'
example.c:(.text+0xb5): undefined reference to `nvmlDeviceGetCount_v2'
example.c:(.text+0xd1): undefined reference to `nvmlErrorString'
example.c:(.text+0x149): undefined reference to `nvmlDeviceGetHandleByIndex_v2'
example.c:(.text+0x165): undefined reference to `nvmlErrorString'
example.c:(.text+0x19f): undefined reference to `nvmlDeviceGetName'
example.c:(.text+0x1bb): undefined reference to `nvmlErrorString'
example.c:(.text+0x1f3): undefined reference to `nvmlDeviceGetPciInfo_v2'
example.c:(.text+0x20f): undefined reference to `nvmlErrorString'
example.c:(.text+0x269): undefined reference to `nvmlDeviceGetComputeMode'
example.c:(.text+0x29d): undefined reference to `nvmlErrorString'
example.c:(.text+0x2ff): undefined reference to `nvmlDeviceSetComputeMode'
example.c:(.text+0x31b): undefined reference to `nvmlErrorString'
example.c:(.text+0x360): undefined reference to `nvmlErrorString'
example.c:(.text+0x3b5): undefined reference to `nvmlDeviceSetComputeMode'
example.c:(.text+0x3d1): undefined reference to `nvmlErrorString'
example.c:(.text+0x40c): undefined reference to `nvmlShutdown'
example.c:(.text+0x428): undefined reference to `nvmlErrorString'
example.c:(.text+0x45f): undefined reference to `nvmlShutdown'
example.c:(.text+0x47b): undefined reference to `nvmlErrorString'
collect2: error: ld returned 1 exit status
make: *** [example] Error 1
pranjal#PCL:~/nvidia$ make
cc -lnvidia-ml -L /usr/lib/nvidia-340/ example.o -o example
example.o: In function `main':
example.c:(.text+0x5f): undefined reference to `nvmlInit_v2'
example.c:(.text+0x7b): undefined reference to `nvmlErrorString'
example.c:(.text+0xb5): undefined reference to `nvmlDeviceGetCount_v2'
example.c:(.text+0xd1): undefined reference to `nvmlErrorString'
example.c:(.text+0x149): undefined reference to `nvmlDeviceGetHandleByIndex_v2'
example.c:(.text+0x165): undefined reference to `nvmlErrorString'
example.c:(.text+0x19f): undefined reference to `nvmlDeviceGetName'
example.c:(.text+0x1bb): undefined reference to `nvmlErrorString'
example.c:(.text+0x1f3): undefined reference to `nvmlDeviceGetPciInfo_v2'
example.c:(.text+0x20f): undefined reference to `nvmlErrorString'
example.c:(.text+0x269): undefined reference to `nvmlDeviceGetComputeMode'
example.c:(.text+0x29d): undefined reference to `nvmlErrorString'
example.c:(.text+0x2ff): undefined reference to `nvmlDeviceSetComputeMode'
example.c:(.text+0x31b): undefined reference to `nvmlErrorString'
example.c:(.text+0x360): undefined reference to `nvmlErrorString'
example.c:(.text+0x3b5): undefined reference to `nvmlDeviceSetComputeMode'
example.c:(.text+0x3d1): undefined reference to `nvmlErrorString'
example.c:(.text+0x40c): undefined reference to `nvmlShutdown'
example.c:(.text+0x428): undefined reference to `nvmlErrorString'
example.c:(.text+0x45f): undefined reference to `nvmlShutdown'
example.c:(.text+0x47b): undefined reference to `nvmlErrorString'
collect2: error: ld returned 1 exit status
make: *** [example] Error 1
Any help would be appreciated. Thank you.
Here's what I did on a linux CUDA 7.5 setup:
Update the GPU driver to 352.79. In my case, this was done via the runfile installer here. If you have previously installed the GPU driver via the package manager method (e.g. .deb) then you don't want to use the runfile installer method.
get the latest version of the GDK (see note below), which at this time happens to target 352.79, and includes nvml:
wget --no-check-certificate http://developer.download.nvidia.com/compute/cuda/7.5/Prod/gdk/gdk_linux_amd64_352_79_release.run
install the GDK:
sh gdk_linux_amd64_352_79_release.run
verify that the appropriate libraries were updated:
ls /usr/lib64/libnv*
(and you should see libnvidia-ml.so.352.79 etc.)
compile the example file:
g++ -I./gdk352_79/usr/include -L/usr/lib64 -lnvidia-ml example.c -o example
When I run the example executable, I get:
$ ./example
Found 2 devices
Listing devices:
0. Quadro 5000 [0000:02:00.0]
Changing device's compute mode from 'Default' to 'Prohibited'
Need root privileges to do that: Insufficient Permissions
1. GeForce GT 640 [0000:03:00.0]
Changing device's compute mode from 'Default' to 'Prohibited'
Need root privileges to do that: Insufficient Permissions
All done.
Press ENTER to continue...
$
Hopefully this will get you going. I am assuming you don't need help making any Makefile changes if needed. If your Makefile is not working, keep modifying it until you get the exact compile command I list in step 5.
NOTE: As of CUDA 8.0, the GDK is not a separate entity but is installed with CUDA 8.0 toolkit. It should not be necessary to install the GDK separately.

undefined reference to `htmlcxx::HTML::ParserDom::parseTree(std::string const&)'

I am using htmlcxx library for a simple program but I got stuck in a problem, I searched many other related solutions but my problem is still a problem, Hope any one can help me, Here is the code I used in Kdevelop on Ubuntu:
#include <iostream>
#include <string>
#include <htmlcxx/html/ParserDom.h>
using namespace htmlcxx;
int main()
{
//Parse some html code
std::string html = "<html><body>hey</body></html>";
HTML::ParserDom parser;
tree<HTML::Node> dom= parser.parseTree(html) ;
//Print whole DOM tree
std::cout << dom << std::endl;
//Dump all links in the tree
tree<HTML::Node>::iterator it = dom.begin();
tree<HTML::Node>::iterator end = dom.end();
for (; it != end; ++it)
{
if (it->tagName() == "A")
{
it->parseAttributes();
std::cout << it->attribute("href").second;
}
}
//Dump all text of the document
it = dom.begin();
end = dom.end();
for (; it != end; ++it)
{
if ((!it->isTag()) && (!it->isComment()))
{
std::cout << it->text();
}
}
return 0;
}
And here is the error come when I build it in Kdevelop:
/home/ratior/projects/html/build> make -j2
Scanning dependencies of target html
[100%] Building CXX object CMakeFiles/html.dir/main.o
Linking CXX executable html
CMakeFiles/html.dir/main.o: In function `main':
/home/ratior/projects/html/main.cpp:17: undefined reference to `htmlcxx::HTML::ParserDom::parseTree(std::string const&)'
/home/ratior/projects/html/main.cpp:20: undefined reference to `htmlcxx::HTML::operator<<(std::ostream&, tree<htmlcxx::HTML::Node, std::allocator<tree_node_<htmlcxx::HTML::Node> > > const&)'
/home/ratior/projects/html/main.cpp:29: undefined reference to `htmlcxx::HTML::Node::parseAttributes()'
CMakeFiles/html.dir/main.o: In function `htmlcxx::HTML::ParserDom::ParserDom()':
/usr/local/include/htmlcxx/html/ParserDom.h:14: undefined reference to `vtable for htmlcxx::HTML::ParserDom'
CMakeFiles/html.dir/main.o: In function `htmlcxx::HTML::ParserDom::~ParserDom()':
/usr/local/include/htmlcxx/html/ParserDom.h:15: undefined reference to `vtable for htmlcxx::HTML::ParserDom'
collect2: error: ld returned 1 exit status
make[2]: *** [html] Error 1
make[1]: *** [CMakeFiles/html.dir/all] Error 2
make: *** [all] Error 2
*** Failure: Exit code 2 **strong text**
Wrong path to the library is the reason why it's not linking the code.