I have build a dll(syncDemo.dll,syncDemo.lib) which has class and functions.
I add syncDemo.lib into my chromium gn file.
libs = ["syncDemo.lib"]
After include .h head file, I can use the function in the .lib.
But when I use the class in the .lib like:
CSyncDemo* csd = new CSyncDemo();csd->TestDemo();
the complier fails with error: unknown type name 'csd'
Are there some build flag need to be change when import class from dll?
Below is the content of my gn file:
static_library("browser") {
"//build/config:precompiled_headers",
]
defines = [ "ZLIB_CONST" ]
...
sources = [
...
"sync_sdk_win/SyncDemo.h",
]
libs = [ "sync_sdk_win/syncDemo.lib" ]