Add as Link Community.CsharpSqlite

279 views Asked by At

I can go into Community.CsharpSqlite folder click the Community.CsharpSqlite.csproj and it will create a Community.CsharpSqlite.dll in either Release or Debug folder.

I attempted to do Add as Link to combine the project with my main project to avoid generating the .dll file.

But the project that makes the .dll file doesn't compile when I add it into my main project has over 240 errors because it has C code in it. Like

The type or namespace name 'typedef' could not be found (are you missing a using directive or an assembly reference?)

and so on it doesn't have any issues compiling as a standalone library. How do I link it up?

Edit: It managed to work after I copy pasted the Conditional compilation symbols: from Community.CsharpSqlite project to my main project

DEBUG;SQLITE_DEBUG TRUE WIN32 _MSC_VER NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_HAS_CODEC SQLITE_MEM_POOL SQLITE_MUTEX_W32 SQLITE_THREADSAFE SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_WAL SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF

As well as Suppressed these warnings 0168 ; 0169; 0414; 0618; 0649

Is that the only way of doing this? messing with main project's build information?.

1

There are 1 answers

0
SSpoke On BEST ANSWER

It managed to work after I copy pasted the Conditional compilation symbols: from Community.CsharpSqlite project to my main project

DEBUG;SQLITE_DEBUG TRUE WIN32 _MSC_VER NO_TCL SQLITE_ASCII SQLITE_DISABLE_LFS SQLITE_HAS_CODEC SQLITE_MEM_POOL SQLITE_MUTEX_W32 SQLITE_THREADSAFE SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_LOOKASIDE SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_WAL SQLITE_OS_WIN SQLITE_SYSTEM_MALLOC VDBE_PROFILE_OFF


As well as Suppressed these warnings0168 ; 0169; 0414; 0618; 0649`

Now it works.