I have a problem including a library to my C++ project. The library is written by collegues but when I try to include it in my project I get a whole bunch of error: stray character in program
, namely these:
||=== Build: Debug in WindowsDgps (compiler: GNU GCC Compiler) ===|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\220' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\3' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\4' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\377' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\377' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\270' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '@' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\200' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\16' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\37' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\272' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\16' in program|
..\WindowsAPI\VibroTacLib.dll|1|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\264' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\315' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\270' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\1' in program|
..\WindowsAPI\VibroTacLib.dll|1|error: stray '\315' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\1' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\272' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\340' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\16' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '#' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\1' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\2' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\26' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\7' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\10' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '`' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\220' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\7' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\24' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\2' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\4' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\1' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\4' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\4' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\375' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\27' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\3' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\20' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\260' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\10' in program|
..\WindowsAPI\VibroTacLib.dll|3|warning: null character(s) ignored [enabled by default]|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\17' in program|
..\WindowsAPI\VibroTacLib.dll|3|error: stray '\5' in program|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 35 warning(s) (4 minute(s), 50 second(s)) ===|
I figure this is because the library is encoded in a different way than my project, after finding several similar questions that had this error inside of the self written program. Could anyone tell me how to fix this problem?
Maybe I included the library wrongly, I use Code::Blocks software and clicked "Build options" on my project, and in the Linker settings tab I included ..\WindowsAPI\libVibroTacLib.a
in the Link libraries window.
The #include
part in my main.cpp
looks like this:
#include "VibroTac.h"
#include "errorcodes.h"
#include "vibroTacTypeDef.h"
#include "VibroTacLib.dll"