darktable-org / darktable-org/rawspeed

Compiling in Visual Studio?

Open
#261 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
456
Forks
147
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use this in a project I have in Visual Studio, but as a C++ beginner I'm at the end of my wits for now.

The header files I managed to make work by doing this in a newly created rawspeedconfig.h, based on some info from various places:

#ifdef _MSC_VER
#define __attribute__(x) 
#define __builtin_unreachable(x)
#define ASAN_REGION_IS_POISONED(x) 0
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif

I also copied a bunch of the code from config.h.in to my rawspeedconfig.h. After that the only remaining issue after compiling was unresolved symbols (all the actual function bodies etc).

But when I include all the other sources, it will just spit out a billion syntax errors and die. Most if it seems to be due to some gcc related stuff. I wanted to use this code as a submodule in git so I don't want to just go rogue and replace all the GCC stuff (and I'm not sure if I should either, since I would likely end up breaking something).

Is there any way at all to compile this code without gcc?

I was thinking of compiling with gcc and using the static library inside Visual Studio but I then read that this is impossible, so I'm back to zero.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the manually created rawspeedconfig.h with config.h.in, then reproduce the syntax errors from the other sources in Visual Studio. Determine the scope of the GCC-specific code and whether the existing CMake/build setup exposes a supported non-GCC path. Done means the project has a working Visual Studio build path or clearly documented support limitations.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.