Giter Club home page Giter Club logo

Comments (10)

lithiumtoast avatar lithiumtoast commented on August 23, 2024

Something is for sure not right.

What os+arch you using?
What parameters are you using?

I use the following parameters for sokol_gfx.h on macOS:

-i
"/Users/lstranks/Programming/sokol/sokol_gfx.h"
-o
"./sokol_gfx.cs"
-u
-l
"sokol_gfx"
-s
"/Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include"

Output: https://www.dropbox.com/s/melgx7wv2ida8lt/sokol_gfx.cs?dl=0

from c2cs.

 avatar commented on August 23, 2024

Windows 10 x64, can it be due to -s parameter that needs to be specified? I tried with -s and clang include path the output is the same.

C2CS.CommandLine.exe -i "sokol_gfx.h" -o "test.cs" -u -l "sokol_gfx"

from c2cs.

lithiumtoast avatar lithiumtoast commented on August 23, 2024

Interesting just tested on Windows 10 Home 64-bit (10.0, Build 18363), and it works for me

-i
"C:\Users\lustr\Programming\sokol\sokol_gfx.h"
-o
"./sokol_gfx.cs"
-u
-l
"sokol_gfx"

Did you copy C2CS.CommandLine.exe to somewhere? I usually just use the tool from the bin directory .\bin\C2CS.CommandLine\Debug\net5.0

from c2cs.

lithiumtoast avatar lithiumtoast commented on August 23, 2024

I'll probably take this opportunity as a hint that I need some CI/CD.

from c2cs.

 avatar commented on August 23, 2024

No no, I used it from the bin directory. Is -s parameter mandatory or the generator should work without it?

Update: I see you use Debug, I tried both Debug and Release version of the generator

from c2cs.

lithiumtoast avatar lithiumtoast commented on August 23, 2024

The -s is for include directories. I would think you would only need to do use it if libclang reported a missing header like:

fatal error: 'stdint.h' file not found

What's the command line output? Is there any clang diagnostics printed to stdout or stderr?

from c2cs.

 avatar commented on August 23, 2024

Ah I see. No errors reported
image

from c2cs.

lithiumtoast avatar lithiumtoast commented on August 23, 2024

May seem dumb, but what are the contents of sokol_gfx.h? That file is copied to bin directory? I usually just pass the full path to the sokol git repository like: C:\Users\lustr\Programming\sokol\sokol_gfx.h

from c2cs.

 avatar commented on August 23, 2024

Uff, that was it. I had not only copied sokol_gfx but other headers, but I guess that was not enough. As soon as I specified the git path as you suggested it all worked. Thank you so much.
image

from c2cs.

lithiumtoast avatar lithiumtoast commented on August 23, 2024

Nice!

Btw, I noticed for sokol_gfx you will need the CBool type. You can find it here: https://github.com/lithiumtoast/c2cs/blob/master/src/dotnet/projects/production/C2CS.Core/C2CS/C/CBool.cs

I'm still trying to figure out how to add this to generated C# files in a smart way...

from c2cs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.