Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6057009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:26:28+00:00 2026-05-23T08:26:28+00:00

So I am having an issue converting an opensource project (SQLite) to use a

  • 0

So I am having an issue converting an opensource project (SQLite) to use a different build system and now I’m having trouble linking projects. Essentially I have a VCProj file that has a definition like this:

<Tool
   Name="VCLinkerTool"
   AdditionalOptions="/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteCommand.bmp,System.Data.SQLite.SQLiteCommand.bmp&#x0D;&#x0A;/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteConnection.bmp,System.Data.SQLite.SQLiteConnection.bmp&#x0D;&#x0A;/ASSEMBLYRESOURCE:..\System.Data.SQLite\SQLiteDataAdapter.bmp,System.Data.SQLite.SQLiteDataAdapter.bmp"
   AdditionalDependencies="..\System.Data.SQLite\bin\System.Data.SQLite.netmodule"
   OutputFile="..\bin\System.Data.SQLite.DLL"
   GenerateManifest="false"
   IgnoreDefaultLibraryNames=""
   ModuleDefinitionFile="src\sqlite3.def"
   EmbedManagedResourceFile=""
   DelayLoadDLLs="advapi32.dll"
   RandomizedBaseAddress="1"
   DataExecutionPrevention="0"
   ImportLibrary=""
   KeyFile="..\System.Data.SQLite\System.Data.SQLite.snk"
   CLRUnmanagedCodeCheck="true"
/>

And I am unable to properly link the System.Data.SQLite.netmodule due to the following error:

Linking…
4>..\System.Data.SQLite\bin\System.Data.SQLite.netmodule : fatal error LNK1302: only support linking safe .netmodules; unable to link pure .netmodule

And the System.Data.SQLite.netmodule is generated from a C#/.NET project. How is it I can force it to compile with the /clr:safe option since according to MSDN this is the way to fix the issue. The problem is is that I don’t know how to compile it with /clr:safe. How is it I can do that in the csproj file or in visual studio somewhere? If I am off base in my attempts to fix this please let me know a better way.

UPDATE:
So I have determined the issue but I’m not sure why it is an issue. So the interop project (the C project which compiles the sqlite code and links) uses the VCLinkerTool to link to the System.Data.SQLite.netmodule. There is then a C# project that creates the System.Data.SQLite.netmodule using the following command (Anything in {} was added to reduce length):

C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /unsafe- /nowarn:1701,1702 /platform:AnyCPU /errorreport:prompt /doc:..\bin\System.Data.SQLite.XML {DLL REFEERENCFES /debug- /filealign:512 /optimize+ /out:obj\Release\System.Data.SQLite.netmodule {RESOURCES AND CS FILES}

The problem is with the /platform:AnyCPU. In my build it is /platform:x86 and for some reason this causes issues when linking and I’m not sure why but this is what I have narrowed it down to since I can change it to AnyCPU and it will build and link properly. Any insight on this is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:26:28+00:00Added an answer on May 23, 2026 at 8:26 am

    Ok so I finally narrowed down what the issue was and maybe someone can spread some more light onto why that is but I have a rough idea why. Basically you can’t have the VCLinkerTool link to .netmodules that were created targetting the /platform:x86 (and I assume any other variant that isn’t AnyCpu. I would assume this has to do with the way that the linking occurs internally when linking the mixed mode dll with a .netmodule. So it looks like for this to work you have to have your C# project compiled with /platorm:AnyCpu.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having an issue converting type. I was trying code like this (minimal,
I'm having an issue with converting a BitmapImage (WPF) to grayscale, whilst keeping the
I'm currently having an issue wrapping my brain around the notion of converting my
I'm having a small issue with lxml. I'm converting an XML doc into an
I am having issues converting a png to tiff. The conversion goes fine, but
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS
I'm having an issue with my regex. I want to capture <% some stuff
I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I
I’m having an issue where a drop down list in IE 6/7 is behaving
I am having an issue where Tomcat is treating extra path information as part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.