Fixed on GIT brl.requesters compilation error

JaviCervera

New member
3rd Party Module Dev
Joined
Jul 12, 2017
Messages
69
I want to use the brl.requesters module on Vortex meshtool, instead of the custom requester library it was using before, but the brl.requesters module gives me the following compilation error on Linux Mint:

error: ‘OS_STR’ was not declared in this scope

It gives the error on several lines, and it also happens when compiling the example from the documentation. I am using the GLFW target.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
Please add piece of code to the requester.cpp file inside modules/brl/native at line 385

C++:
typedef char OS_CHAR;

static String::CString<OS_CHAR> OS_STR( const String &t ){
    return t.ToCString<OS_CHAR>();
}
 

JaviCervera

New member
3rd Party Module Dev
Joined
Jul 12, 2017
Messages
69
Thanks! On Windows, the module also gives several linker errors:

build/Release64/main.o:main.cpp:(.text+0x885e): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x8c24): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x151af): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x154b7): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x1558f): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x158a9): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x15a56): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x15b24): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x15b5c): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x15cc2): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x17300): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x17414): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x1778e): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x17a35): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x183f9): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x1855f): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x1865e): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x186b8): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x18704): undefined reference to `__imp_CoUninitialize'
build/Release64/main.o:main.cpp:(.text+0x18832): undefined reference to `__imp_CoInitializeEx'
build/Release64/main.o:main.cpp:(.text+0x18cf2): undefined reference to `__imp_CoUninitialize'

This is because -lole32 should be added to the Makefile. I am doing this by hand on Vortex, but since brl.requesters is a builtin module now, Cerberus should do it by itself.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
Mmh, can't confirm that. Compiles, links and runs fine here either with MingW 4.9 or Visual Studio Community 2017.
 
Top Bottom