0

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" ]
  • Would be better if you can show the relevant portion of `GN` file – Asesh Sep 10 '20 at 15:49
  • 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" ]` – user7706225 Sep 11 '20 at 01:49

0 Answers0