The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,837 other followers

Archive for the ‘Visual Studio C++’ Category

OMF, COFF and the 32-bit/64-bit Delphi or C++ compilers

Posted by jpluimers on 2020/01/29

Via [WayBack] As far as I can tell (and documentation on that is reaaaaaaly hard to find), dcc64 can link in .obj files in OMF and COFF format. Bcc64 uses LLVM chain and therefore produces ELF .o files… – Primož Gabrijelčič – Google+:

David Heffernan:
dcc32 does coff and omf, dcc64 only coff

and later he commented:

One of the difficulties with linking objects is the handling of exceptions. The 64 bit exception model is table based, in contrast to the stack based 32 bit model.

I don’t think that the exception tables are written correctly for code linked in objects. If exceptions are raised then this can lead to abnormal process termination. Process just disappears. Poof!

One common way that this happens is floating point exceptions that are by default unmasked by the Delphi RTL. I have found it necessary to mask them when calling into any linked object code to avoid exceptions being raised.

And compiling with cl can be a bit of a game. It’s stack checking options need to be disabled. And there are a few other key switches that help. And then there’s the forward declaration trick to help the one pass compiler cope with C objects that are expected to be linked in a separate step.

Anyway, it can be quite a challenge at times, but I’ve yet to find a plain self contained C library that has defeated me!

–jeroen

Posted in C++, C++ Builder, Delphi, Delphi x64, Development, Software Development, Visual Studio C++ | 2 Comments »

Links to various Visual C++ Redistributable Packages for Visual Studio downloads (arm/x64/x86 when available)

Posted by jpluimers on 2018/01/17

Link archive so I know how to get the 64-bit ARM, 32-bit Win32/x86 and 64-bit Win64/x64 downloads for the Visual C++ Redistributable files.

Note the various names of pages and files Microsoft uses.

–jeroen

Posted in C++, Development, Software Development, Visual Studio C++ | Leave a Comment »

Building OpenSSL on Windows

Posted by jpluimers on 2017/10/03

Some very interesting links:

–jeroen

Posted in C, C++, Development, Software Development, Visual Studio C++ | Leave a Comment »

instead of x86, msbuild is creating an x64 solution configuration via sln.metaproj – Stack Overflow

Posted by jpluimers on 2017/05/02

Sometimes msbuild will throw an error like this  for an x86 project:

"C:\Users\Developer\Versioned\libssh2\build\libssh2.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
C:\Users\Developer\Versioned\libssh2\build\libssh2.sln.metaproj : error MSB4126: The specified solution configuration "Debug|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties
form="Any CPU") or leave those properties blank to use the default solution configuration. [C:\Users\Developer\Versioned\libssh2\build\libssh2.sln]

Cause:

vsvars64.bat will set the environment variable Platform=x64 but vsvars32.bat will not empty this environment variable.

Easiest is to run set Platform= then run vsvars32.bat.

Adopted from MSBuild creating an x64 solution configuration via sln.metaproj – Stack Overflow [WayBack]:

If you are running this in the Visual Studio x64 command window it will set an environment variable Platform=x64 that will be used by msbuild. You can verify this by running echo in the command prompt you are using.

echo %platform%

So you will need to override the default when using x64 cmd, or run from the x86 cmd.

malexander

–jeroen

Posted in .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio and tools, Visual Studio C++ | Leave a Comment »

Workaround for “Visual Studio 2015 C++ Compiler Secretly Inserts Telemetry Code Into Binaries” – Slashdot

Posted by jpluimers on 2016/07/20

Reader edxwelch writes:

Reddit user sammiesdog discovered recently that Visual Studio 2015 C++ compiler was inserting calls to a Microsoft telemetry function into binaries. “I compiled a simple program with only main(). When looking at the compiled binary in IDA, I see a call fortelemetry_main_invoke_trigger and telemetry_main_return_trigger. I cannot find documentation for these calls, either on the web or in the options page,” he wrote. Only after the discovery did Steve Carroll, the dev manager for Visual C++ admit to the “feature” and posted a workaround to remove it.

A Microsoft spokesperson confirmed the existence of this behavior to InfoQ, adding that the company wil be removing it in a future preview build. For those who wish to get rid of it, the blog writes:

Users who have a copy of VS2015 Update 2 and wish to turn off the telemetry functionality currently being compiled into their code should add notelemetry.obj to their linker command line.

Quoted in full as I’m baffled.

Source: Visual Studio 2015 C++ Compiler Secretly Inserts Telemetry Code Into Binaries – Slashdot

via: Dear developers, I thought you should know. Yours, privacy. http://m.slashdot.org/story/312289Jan Wildeboer – Google+

–jeroen

Posted in C++, Development, Software Development, Visual Studio C++ | 1 Comment »

 
%d bloggers like this: